summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/api/media_galleries_private.idl
blob: 8658d25dd6b3256f705d09db9dbda8a2b4d7bd03 (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
// Copyright (c) 2012 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.

// This is a private API since M23. Gallery watching needs to be implemented
// on platforms others than Windows and then moved to the public API.
// See http://crbug.com/166950.
namespace mediaGalleriesPrivate {
  // A dictionary that describes the modified gallery.
  [inline_doc] dictionary GalleryChangeDetails {
    // Gallery identifier.
    DOMString galleryId;
  };

  interface Events {
    // Fired when a media gallery is changed.
    static void onGalleryChanged(GalleryChangeDetails details);
  };

  // A dictionary that describes the add gallery watch request results.
  dictionary AddGalleryWatchResult {
    DOMString galleryId;
    boolean success;
  };

  callback AddGalleryWatchCallback = void (AddGalleryWatchResult result);
  callback GetAllGalleryWatchCallback = void (DOMString[] galleryIds);

  interface Functions {
    static void addGalleryWatch(DOMString galleryId,
                                AddGalleryWatchCallback callback);
    static void removeGalleryWatch(DOMString galleryId);
    static void getAllGalleryWatch(GetAllGalleryWatchCallback callback);
    static void removeAllGalleryWatch();
  };
};