1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
7 callback PlacesEventCallback = undefined (sequence<PlacesEvent> events);
9 [ChromeOnly, Exposed=Window]
10 interface PlacesWeakCallbackWrapper {
11 constructor(PlacesEventCallback callback);
14 // Global singleton which should handle all events for places.
15 [ChromeOnly, Exposed=Window]
16 namespace PlacesObservers {
18 undefined addListener(sequence<PlacesEventType> eventTypes,
19 PlacesEventCallback listener);
21 undefined addListener(sequence<PlacesEventType> eventTypes,
22 PlacesWeakCallbackWrapper listener);
24 undefined removeListener(sequence<PlacesEventType> eventTypes,
25 PlacesEventCallback listener);
27 undefined removeListener(sequence<PlacesEventType> eventTypes,
28 PlacesWeakCallbackWrapper listener);
30 undefined notifyListeners(sequence<PlacesEvent> events);