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