Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / common / extensions / api / media_galleries_private.idl
blobe04df524d04b2c40c1458a3151143fdff77de276
1 // Copyright (c) 2012 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 // This is a private API since M23. This will be superceded by the
6 // systeminfo.storage API in the future.
7 // See http://crbug.com/166950 and http://crbug.com/177605.
8 namespace mediaGalleriesPrivate {
9 // A dictionary that describes an attached device.
10 [inline_doc] dictionary DeviceAttachmentDetails {
11 // The name of the device.
12 DOMString deviceName;
14 // A transient id that unique identifies the device.
15 DOMString deviceId;
18 // A dictionary that describes a detached device.
19 [inline_doc] dictionary DeviceDetachmentDetails {
20 // A transient id that unique identifies the device.
21 DOMString deviceId;
24 // A dictionary that describes the modified gallery.
25 [inline_doc] dictionary GalleryChangeDetails {
26 // Gallery identifier.
27 DOMString galleryId;
30 interface Events {
31 // Fired when a media device gets attached.
32 static void onDeviceAttached(DeviceAttachmentDetails details);
34 // Fired when a media device gets detached.
35 static void onDeviceDetached(DeviceDetachmentDetails details);
37 // Fired when a media gallery is changed.
38 static void onGalleryChanged(GalleryChangeDetails details);
41 // A dictionary that describes the add gallery watch request results.
42 dictionary AddGalleryWatchResult {
43 DOMString galleryId;
44 boolean success;
47 callback AddGalleryWatchCallback = void (AddGalleryWatchResult result);
48 callback GetAllGalleryWatchCallback = void (DOMString[] galleryIds);
50 // A dictionary that describes a media galleries handler.
51 [inline_doc] dictionary MediaGalleriesHandler {
52 // Unique action id per extension.
53 DOMString id;
55 // ID of the extension handling this handler.
56 DOMString extensionId;
58 // Localized title describing the action.
59 DOMString title;
61 // Url of the icon.
62 DOMString iconUrl;
65 callback GetHandlersCallback = void (MediaGalleriesHandler[] handlers);
67 interface Functions {
68 static void addGalleryWatch(DOMString galleryId,
69 AddGalleryWatchCallback callback);
70 static void removeGalleryWatch(DOMString galleryId);
71 static void getAllGalleryWatch(GetAllGalleryWatchCallback callback);
72 static void removeAllGalleryWatch();
73 static void getHandlers(GetHandlersCallback callback);