blob: 362f37c50fe5fe97bc1c6057da71273b191d39b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// webstoreWidgetPrivate API.
// This is a private API used by the Chrome Webstore widget app on Chrome OS.
[platforms=("chromeos")]
namespace webstoreWidgetPrivate {
// The type of apps that should be shown in the Webstore widget.
enum Type {
// Type that should be used to list printer provider apps. For this type,
// options passed to |onShowWidget| should have |usbId| property set.
PRINTER_PROVIDER
};
// ID for a USB device.
dictionary UsbId {
// The USB device's vendor ID property.
long vendorId;
// The USB device's product ID property.
long productId;
};
// Filter for apps that will be shown in the Webstore widget.
dictionary Options {
// The type of apps that should be shown.
Type type;
// If set, only apps that have printerProvider permission and usbDevices
// permission for USB device with the provided (vendor ID, product ID) pair.
// Required if |type| is set to |PRINTER_PROVIDER|.
UsbId? usbId;
};
// |result| Object containing the string assets.
callback GetStringsCallback = void(object result);
// Callback that does not take arguments.
callback SimpleCallback = void();
interface Functions {
// Gets localized strings and initialization data.
static void getStrings(GetStringsCallback callback);
// Requests to install a webstore item.
// |item_id| The id of the item to install.
// |silentInstallation| False to show installation prompt. True not to show.
// Can be set to true only for a subset of installation requests.
static void installWebstoreItem(DOMString itemId,
boolean silentInstallation,
SimpleCallback callback);
};
interface Events {
// Event dispatched when a Chrome Webstore widget is requested to be shown.
// |options|: Options describing the set of apps that should be shown in the
// widget.
static void onShowWidget(Options options);
};
};
|