michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: #include "nsIDOMWindow.idl" michael@0: michael@0: [scriptable, uuid(0843f3c1-043e-4c64-9d8c-091370548c05)] michael@0: interface nsIBrowserTab : nsISupports { michael@0: readonly attribute nsIDOMWindow window; michael@0: readonly attribute float scale; michael@0: }; michael@0: michael@0: [scriptable, uuid(08426a73-e70b-4680-9282-630932e2b2bb)] michael@0: interface nsIUITelemetryObserver : nsISupports { michael@0: void startSession(in wstring name, michael@0: in unsigned long timestamp); michael@0: void stopSession(in wstring name, michael@0: in wstring reason, michael@0: in unsigned long timestamp); michael@0: void addEvent(in wstring action, michael@0: in wstring method, michael@0: in unsigned long timestamp, michael@0: in wstring extras); michael@0: }; michael@0: michael@0: [scriptable, uuid(c31331d2-afad-460f-9c66-728b8c838cec)] michael@0: interface nsIAndroidBrowserApp : nsISupports { michael@0: nsIBrowserTab getBrowserTab(in int32_t tabId); michael@0: void getPreferences(in int32_t requestId, michael@0: [array, size_is(count)] in wstring prefNames, michael@0: in unsigned long count); michael@0: void observePreferences(in int32_t requestId, michael@0: [array, size_is(count)] in wstring prefNames, michael@0: in unsigned long count); michael@0: void removePreferenceObservers(in int32_t requestId); michael@0: nsIUITelemetryObserver getUITelemetryObserver(); michael@0: }; michael@0: michael@0: [scriptable, uuid(59cfcb35-69b7-47b2-8155-32b193272666)] michael@0: interface nsIAndroidViewport : nsISupports { michael@0: readonly attribute float x; michael@0: readonly attribute float y; michael@0: readonly attribute float width; michael@0: readonly attribute float height; michael@0: readonly attribute float pageLeft; michael@0: readonly attribute float pageTop; michael@0: readonly attribute float pageRight; michael@0: readonly attribute float pageBottom; michael@0: readonly attribute float cssPageLeft; michael@0: readonly attribute float cssPageTop; michael@0: readonly attribute float cssPageRight; michael@0: readonly attribute float cssPageBottom; michael@0: readonly attribute float zoom; michael@0: }; michael@0: michael@0: [scriptable, uuid(e1bfbc07-dbae-409d-a5b5-ef57522c1f15)] michael@0: interface nsIAndroidDisplayport : nsISupports { michael@0: attribute float left; michael@0: attribute float top; michael@0: attribute float right; michael@0: attribute float bottom; michael@0: attribute float resolution; michael@0: }; michael@0: michael@0: [scriptable, uuid(1beb70d3-70f3-4742-98cc-a3d301b26c0c)] michael@0: interface nsIAndroidBridge : nsISupports michael@0: { michael@0: [implicit_jscontext] void handleGeckoMessage(in jsval message); michael@0: attribute nsIAndroidBrowserApp browserApp; michael@0: nsIAndroidDisplayport getDisplayPort(in boolean aPageSizeUpdate, in boolean isBrowserContentDisplayed, in int32_t tabId, in nsIAndroidViewport metrics); michael@0: void contentDocumentChanged(); michael@0: boolean isContentDocumentDisplayed(); michael@0: };