widget/android/nsIAndroidBridge.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/widget/android/nsIAndroidBridge.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,74 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#include "nsISupports.idl"
     1.9 +#include "nsIDOMWindow.idl"
    1.10 +
    1.11 +[scriptable, uuid(0843f3c1-043e-4c64-9d8c-091370548c05)]
    1.12 +interface nsIBrowserTab : nsISupports {
    1.13 +  readonly attribute nsIDOMWindow window;
    1.14 +  readonly attribute float scale;
    1.15 +};
    1.16 +
    1.17 +[scriptable, uuid(08426a73-e70b-4680-9282-630932e2b2bb)]
    1.18 +interface nsIUITelemetryObserver : nsISupports {
    1.19 +  void startSession(in wstring name,
    1.20 +                    in unsigned long timestamp);
    1.21 +  void stopSession(in wstring name,
    1.22 +                   in wstring reason,
    1.23 +                   in unsigned long timestamp);
    1.24 +  void addEvent(in wstring action,
    1.25 +                in wstring method,
    1.26 +                in unsigned long timestamp,
    1.27 +                in wstring extras);
    1.28 +};
    1.29 +
    1.30 +[scriptable, uuid(c31331d2-afad-460f-9c66-728b8c838cec)]
    1.31 +interface nsIAndroidBrowserApp : nsISupports {
    1.32 +  nsIBrowserTab getBrowserTab(in int32_t tabId);
    1.33 +  void getPreferences(in int32_t requestId,
    1.34 +                      [array, size_is(count)] in wstring prefNames,
    1.35 +                      in unsigned long count);
    1.36 +  void observePreferences(in int32_t requestId,
    1.37 +                          [array, size_is(count)] in wstring prefNames,
    1.38 +                          in unsigned long count);
    1.39 +  void removePreferenceObservers(in int32_t requestId);
    1.40 +  nsIUITelemetryObserver getUITelemetryObserver();
    1.41 +};
    1.42 +
    1.43 +[scriptable, uuid(59cfcb35-69b7-47b2-8155-32b193272666)]
    1.44 +interface nsIAndroidViewport : nsISupports {
    1.45 +  readonly attribute float x;
    1.46 +  readonly attribute float y;
    1.47 +  readonly attribute float width;
    1.48 +  readonly attribute float height;
    1.49 +  readonly attribute float pageLeft;
    1.50 +  readonly attribute float pageTop;
    1.51 +  readonly attribute float pageRight;
    1.52 +  readonly attribute float pageBottom;
    1.53 +  readonly attribute float cssPageLeft;
    1.54 +  readonly attribute float cssPageTop;
    1.55 +  readonly attribute float cssPageRight;
    1.56 +  readonly attribute float cssPageBottom;
    1.57 +  readonly attribute float zoom;
    1.58 +};
    1.59 +
    1.60 +[scriptable, uuid(e1bfbc07-dbae-409d-a5b5-ef57522c1f15)]
    1.61 +interface nsIAndroidDisplayport : nsISupports {
    1.62 +  attribute float left;
    1.63 +  attribute float top;
    1.64 +  attribute float right;
    1.65 +  attribute float bottom;
    1.66 +  attribute float resolution;
    1.67 +};
    1.68 +
    1.69 +[scriptable, uuid(1beb70d3-70f3-4742-98cc-a3d301b26c0c)]
    1.70 +interface nsIAndroidBridge : nsISupports
    1.71 +{
    1.72 +  [implicit_jscontext] void handleGeckoMessage(in jsval message);
    1.73 +  attribute nsIAndroidBrowserApp browserApp;
    1.74 +  nsIAndroidDisplayport getDisplayPort(in boolean aPageSizeUpdate, in boolean isBrowserContentDisplayed, in int32_t tabId, in nsIAndroidViewport metrics);
    1.75 +  void contentDocumentChanged();
    1.76 +  boolean isContentDocumentDisplayed();
    1.77 +};

mercurial