OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This is a private API since M23. Gallery watching needs to be implemented | 5 // This is a private API since M23. Gallery watching needs to be implemented |
6 // on platforms others than Windows and then moved to the public API. | 6 // on platforms others than Windows and then moved to the public API. |
7 // See http://crbug.com/166950. | 7 // See http://crbug.com/166950. |
8 namespace mediaGalleriesPrivate { | 8 namespace mediaGalleriesPrivate { |
9 // A dictionary that describes the modified gallery. | 9 // A dictionary that describes the modified gallery. |
10 [inline_doc] dictionary GalleryChangeDetails { | 10 [inline_doc] dictionary GalleryChangeDetails { |
11 // Gallery identifier. | 11 // Gallery identifier. |
12 DOMString galleryId; | 12 DOMString galleryId; |
13 }; | 13 }; |
14 | 14 |
15 interface Events { | 15 interface Events { |
16 // Fired when a media gallery is changed. | 16 // Fired when a media gallery is changed. |
17 static void onGalleryChanged(GalleryChangeDetails details); | 17 static void onGalleryChanged(GalleryChangeDetails details); |
18 }; | 18 }; |
19 | 19 |
20 // A dictionary that describes the add gallery watch request results. | 20 // A dictionary that describes the add gallery watch request results. |
21 dictionary AddGalleryWatchResult { | 21 dictionary AddGalleryWatchResult { |
22 DOMString galleryId; | 22 DOMString galleryId; |
23 boolean success; | 23 boolean success; |
24 }; | 24 }; |
25 | 25 |
26 callback AddGalleryWatchCallback = void (AddGalleryWatchResult result); | 26 callback AddGalleryWatchCallback = void (AddGalleryWatchResult result); |
27 callback GetAllGalleryWatchCallback = void (DOMString[] galleryIds); | 27 callback GetAllGalleryWatchCallback = void (DOMString[] galleryIds); |
28 | 28 |
29 // A dictionary that describes a media galleries handler. | |
30 [inline_doc] dictionary MediaGalleriesHandler { | |
31 // Unique action id per extension. | |
32 DOMString id; | |
33 | |
34 // ID of the extension handling this handler. | |
35 DOMString extensionId; | |
36 | |
37 // Localized title describing the action. | |
38 DOMString title; | |
39 | |
40 // Url of the icon. | |
41 DOMString iconUrl; | |
42 }; | |
43 | |
44 callback GetHandlersCallback = void (MediaGalleriesHandler[] handlers); | |
45 | |
46 interface Functions { | 29 interface Functions { |
47 static void addGalleryWatch(DOMString galleryId, | 30 static void addGalleryWatch(DOMString galleryId, |
48 AddGalleryWatchCallback callback); | 31 AddGalleryWatchCallback callback); |
49 static void removeGalleryWatch(DOMString galleryId); | 32 static void removeGalleryWatch(DOMString galleryId); |
50 static void getAllGalleryWatch(GetAllGalleryWatchCallback callback); | 33 static void getAllGalleryWatch(GetAllGalleryWatchCallback callback); |
51 static void removeAllGalleryWatch(); | 34 static void removeAllGalleryWatch(); |
52 static void getHandlers(GetHandlersCallback callback); | |
53 }; | 35 }; |
54 }; | 36 }; |
OLD | NEW |