widget/android/nsIAndroidBridge.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #include "nsISupports.idl"
michael@0 6 #include "nsIDOMWindow.idl"
michael@0 7
michael@0 8 [scriptable, uuid(0843f3c1-043e-4c64-9d8c-091370548c05)]
michael@0 9 interface nsIBrowserTab : nsISupports {
michael@0 10 readonly attribute nsIDOMWindow window;
michael@0 11 readonly attribute float scale;
michael@0 12 };
michael@0 13
michael@0 14 [scriptable, uuid(08426a73-e70b-4680-9282-630932e2b2bb)]
michael@0 15 interface nsIUITelemetryObserver : nsISupports {
michael@0 16 void startSession(in wstring name,
michael@0 17 in unsigned long timestamp);
michael@0 18 void stopSession(in wstring name,
michael@0 19 in wstring reason,
michael@0 20 in unsigned long timestamp);
michael@0 21 void addEvent(in wstring action,
michael@0 22 in wstring method,
michael@0 23 in unsigned long timestamp,
michael@0 24 in wstring extras);
michael@0 25 };
michael@0 26
michael@0 27 [scriptable, uuid(c31331d2-afad-460f-9c66-728b8c838cec)]
michael@0 28 interface nsIAndroidBrowserApp : nsISupports {
michael@0 29 nsIBrowserTab getBrowserTab(in int32_t tabId);
michael@0 30 void getPreferences(in int32_t requestId,
michael@0 31 [array, size_is(count)] in wstring prefNames,
michael@0 32 in unsigned long count);
michael@0 33 void observePreferences(in int32_t requestId,
michael@0 34 [array, size_is(count)] in wstring prefNames,
michael@0 35 in unsigned long count);
michael@0 36 void removePreferenceObservers(in int32_t requestId);
michael@0 37 nsIUITelemetryObserver getUITelemetryObserver();
michael@0 38 };
michael@0 39
michael@0 40 [scriptable, uuid(59cfcb35-69b7-47b2-8155-32b193272666)]
michael@0 41 interface nsIAndroidViewport : nsISupports {
michael@0 42 readonly attribute float x;
michael@0 43 readonly attribute float y;
michael@0 44 readonly attribute float width;
michael@0 45 readonly attribute float height;
michael@0 46 readonly attribute float pageLeft;
michael@0 47 readonly attribute float pageTop;
michael@0 48 readonly attribute float pageRight;
michael@0 49 readonly attribute float pageBottom;
michael@0 50 readonly attribute float cssPageLeft;
michael@0 51 readonly attribute float cssPageTop;
michael@0 52 readonly attribute float cssPageRight;
michael@0 53 readonly attribute float cssPageBottom;
michael@0 54 readonly attribute float zoom;
michael@0 55 };
michael@0 56
michael@0 57 [scriptable, uuid(e1bfbc07-dbae-409d-a5b5-ef57522c1f15)]
michael@0 58 interface nsIAndroidDisplayport : nsISupports {
michael@0 59 attribute float left;
michael@0 60 attribute float top;
michael@0 61 attribute float right;
michael@0 62 attribute float bottom;
michael@0 63 attribute float resolution;
michael@0 64 };
michael@0 65
michael@0 66 [scriptable, uuid(1beb70d3-70f3-4742-98cc-a3d301b26c0c)]
michael@0 67 interface nsIAndroidBridge : nsISupports
michael@0 68 {
michael@0 69 [implicit_jscontext] void handleGeckoMessage(in jsval message);
michael@0 70 attribute nsIAndroidBrowserApp browserApp;
michael@0 71 nsIAndroidDisplayport getDisplayPort(in boolean aPageSizeUpdate, in boolean isBrowserContentDisplayed, in int32_t tabId, in nsIAndroidViewport metrics);
michael@0 72 void contentDocumentChanged();
michael@0 73 boolean isContentDocumentDisplayed();
michael@0 74 };

mercurial