widget/android/nsIAndroidBridge.idl

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

mercurial