2009-09-10 02:00:14 +04:00
|
|
|
/* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8 -*- */
|
2009-08-18 23:05:15 +04:00
|
|
|
/* vim: set sw=4 ts=8 et tw=80 ft=cpp : */
|
|
|
|
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-08-26 03:07:22 +04:00
|
|
|
|
2012-08-02 10:02:29 +04:00
|
|
|
include protocol PBlob;
|
2014-02-24 00:19:43 +04:00
|
|
|
include protocol PColorPicker;
|
2010-07-19 22:33:33 +04:00
|
|
|
include protocol PContent;
|
2014-06-11 09:44:13 +04:00
|
|
|
include protocol PContentBridge;
|
2010-04-27 11:12:38 +04:00
|
|
|
include protocol PDocumentRenderer;
|
2010-09-10 09:00:08 +04:00
|
|
|
include protocol PContentPermissionRequest;
|
2014-02-18 04:30:06 +04:00
|
|
|
include protocol PFilePicker;
|
2014-09-27 03:21:57 +04:00
|
|
|
include protocol PIndexedDBPermissionRequest;
|
2010-08-21 03:24:41 +04:00
|
|
|
include protocol PRenderFrame;
|
2014-11-12 23:59:18 +03:00
|
|
|
include protocol PPluginWidget;
|
2012-08-23 23:33:46 +04:00
|
|
|
include DOMTypes;
|
2013-07-11 02:05:39 +04:00
|
|
|
include JavaScriptTypes;
|
2012-08-23 23:33:46 +04:00
|
|
|
include URIParams;
|
2014-02-10 00:34:40 +04:00
|
|
|
include PContentPermission;
|
2015-02-11 14:53:00 +03:00
|
|
|
include ServiceWorkerRegistrarTypes;
|
2009-09-10 02:00:14 +04:00
|
|
|
|
2012-08-02 10:02:29 +04:00
|
|
|
|
2013-10-01 23:25:07 +04:00
|
|
|
using class IPC::Principal from "mozilla/dom/PermissionMessageUtils.h";
|
2014-06-19 04:57:51 +04:00
|
|
|
using class mozilla::gfx::Matrix from "mozilla/gfx/Matrix.h";
|
2013-10-01 23:25:07 +04:00
|
|
|
using struct gfxSize from "gfxPoint.h";
|
|
|
|
using CSSRect from "Units.h";
|
2015-02-04 23:21:03 +03:00
|
|
|
using LayoutDeviceIntRect from "Units.h";
|
2015-03-05 12:13:05 +03:00
|
|
|
using ScreenIntSize from "Units.h";
|
2013-10-01 23:25:07 +04:00
|
|
|
using struct mozilla::layers::FrameMetrics from "FrameMetrics.h";
|
2013-11-13 22:20:31 +04:00
|
|
|
using struct mozilla::layers::ScrollableLayerGuid from "FrameMetrics.h";
|
2014-01-06 22:26:44 +04:00
|
|
|
using struct mozilla::layers::ZoomConstraints from "FrameMetrics.h";
|
2013-10-01 23:25:07 +04:00
|
|
|
using FrameMetrics::ViewID from "FrameMetrics.h";
|
|
|
|
using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
|
|
|
|
using mozilla::WindowsHandle from "ipc/IPCMessageUtils.h";
|
|
|
|
using nscolor from "nsColor.h";
|
|
|
|
using class mozilla::WidgetCompositionEvent from "ipc/nsGUIEventIPC.h";
|
2014-09-11 17:46:17 +04:00
|
|
|
using struct mozilla::widget::IMENotification from "nsIWidget.h";
|
2013-10-01 23:25:07 +04:00
|
|
|
using struct nsIMEUpdatePreference from "nsIWidget.h";
|
|
|
|
using struct nsIntPoint from "nsPoint.h";
|
|
|
|
using struct nsIntRect from "nsRect.h";
|
|
|
|
using struct nsIntSize from "nsSize.h";
|
|
|
|
using class mozilla::WidgetKeyboardEvent from "ipc/nsGUIEventIPC.h";
|
|
|
|
using class mozilla::WidgetMouseEvent from "ipc/nsGUIEventIPC.h";
|
|
|
|
using class mozilla::WidgetWheelEvent from "ipc/nsGUIEventIPC.h";
|
|
|
|
using struct nsRect from "nsRect.h";
|
|
|
|
using class mozilla::WidgetSelectionEvent from "ipc/nsGUIEventIPC.h";
|
|
|
|
using class mozilla::WidgetTouchEvent from "ipc/nsGUIEventIPC.h";
|
|
|
|
using struct mozilla::dom::RemoteDOMEvent from "mozilla/dom/TabMessageUtils.h";
|
|
|
|
using mozilla::dom::ScreenOrientation from "mozilla/dom/ScreenOrientation.h";
|
|
|
|
using struct mozilla::layers::TextureFactoryIdentifier from "mozilla/layers/CompositorTypes.h";
|
2014-03-12 23:27:45 +04:00
|
|
|
using mozilla::CSSPoint from "Units.h";
|
2013-10-01 23:25:07 +04:00
|
|
|
using mozilla::CSSToScreenScale from "Units.h";
|
2014-03-20 19:46:29 +04:00
|
|
|
using mozilla::CommandInt from "mozilla/EventForwards.h";
|
2015-03-03 00:41:02 +03:00
|
|
|
using mozilla::Modifiers from "mozilla/EventForwards.h";
|
2014-04-15 21:39:20 +04:00
|
|
|
using mozilla::layers::GeckoContentController::APZStateChange from "mozilla/layers/GeckoContentController.h";
|
2014-12-05 05:15:43 +03:00
|
|
|
using mozilla::WritingMode from "WritingModes.h";
|
2015-03-19 13:33:33 +03:00
|
|
|
using mozilla::layers::TouchBehaviorFlags from "mozilla/layers/APZUtils.h";
|
2013-10-01 23:25:07 +04:00
|
|
|
|
2009-08-26 03:07:22 +04:00
|
|
|
namespace mozilla {
|
2009-09-10 02:00:14 +04:00
|
|
|
namespace dom {
|
2009-08-26 03:07:22 +04:00
|
|
|
|
2014-03-20 19:46:29 +04:00
|
|
|
struct NativeKeyBinding
|
|
|
|
{
|
|
|
|
CommandInt[] singleLineCommands;
|
|
|
|
CommandInt[] multiLineCommands;
|
|
|
|
CommandInt[] richTextCommands;
|
|
|
|
};
|
|
|
|
|
2015-02-11 14:53:00 +03:00
|
|
|
struct BrowserConfiguration
|
|
|
|
{
|
|
|
|
ServiceWorkerRegistrationData[] serviceWorkerRegistrations;
|
|
|
|
};
|
|
|
|
|
2014-03-20 19:46:29 +04:00
|
|
|
union MaybeNativeKeyBinding
|
|
|
|
{
|
|
|
|
NativeKeyBinding;
|
|
|
|
void_t;
|
|
|
|
};
|
|
|
|
|
2014-11-24 22:05:35 +03:00
|
|
|
struct ShowInfo
|
|
|
|
{
|
|
|
|
nsString name;
|
|
|
|
bool fullscreenAllowed;
|
|
|
|
bool isPrivate;
|
2014-12-12 20:50:46 +03:00
|
|
|
float dpi;
|
|
|
|
double defaultScale;
|
2014-11-24 22:05:35 +03:00
|
|
|
};
|
|
|
|
|
2015-01-16 21:07:50 +03:00
|
|
|
struct FrameScriptInfo
|
|
|
|
{
|
|
|
|
nsString url;
|
|
|
|
bool runInGlobalScope;
|
|
|
|
};
|
|
|
|
|
2015-01-28 22:53:46 +03:00
|
|
|
prio(normal upto urgent) sync protocol PBrowser
|
2009-08-26 03:07:22 +04:00
|
|
|
{
|
2014-06-11 09:44:13 +04:00
|
|
|
manager PContent or PContentBridge;
|
2010-07-19 22:33:33 +04:00
|
|
|
|
2014-02-24 00:19:43 +04:00
|
|
|
manages PColorPicker;
|
2009-10-29 20:58:31 +03:00
|
|
|
manages PDocumentRenderer;
|
2010-09-10 09:00:08 +04:00
|
|
|
manages PContentPermissionRequest;
|
2014-02-18 04:30:06 +04:00
|
|
|
manages PFilePicker;
|
2014-09-27 03:21:57 +04:00
|
|
|
manages PIndexedDBPermissionRequest;
|
2010-08-21 03:24:41 +04:00
|
|
|
manages PRenderFrame;
|
2014-11-12 23:59:18 +03:00
|
|
|
manages PPluginWidget;
|
2010-07-19 22:33:33 +04:00
|
|
|
|
|
|
|
both:
|
2013-11-06 21:21:15 +04:00
|
|
|
AsyncMessage(nsString aMessage, ClonedMessageData aData, CpowEntry[] aCpows,
|
|
|
|
Principal aPrincipal);
|
2009-09-10 02:00:14 +04:00
|
|
|
|
2014-11-16 21:23:22 +03:00
|
|
|
/**
|
|
|
|
* Create a layout frame (encapsulating a remote layer tree) for
|
|
|
|
* the page that is currently loaded in the <browser>.
|
|
|
|
*/
|
|
|
|
PRenderFrame();
|
|
|
|
|
2009-11-05 21:14:22 +03:00
|
|
|
parent:
|
2014-11-12 23:59:18 +03:00
|
|
|
/*
|
|
|
|
* Creates a new remoted nsIWidget connection for windowed plugins
|
|
|
|
* in e10s mode. This is always initiated from the child in response
|
|
|
|
* to windowed plugin creation.
|
|
|
|
*/
|
|
|
|
sync PPluginWidget();
|
|
|
|
|
2015-01-23 13:10:52 +03:00
|
|
|
/**
|
|
|
|
* Return native data of root widget
|
|
|
|
*/
|
|
|
|
sync GetWidgetNativeData() returns (WindowsHandle value);
|
|
|
|
|
|
|
|
parent:
|
2009-11-05 21:14:22 +03:00
|
|
|
/**
|
|
|
|
* When child sends this message, parent should move focus to
|
|
|
|
* the next or previous focusable element.
|
|
|
|
*/
|
2010-07-19 22:33:33 +04:00
|
|
|
MoveFocus(bool forward);
|
2009-11-05 21:14:22 +03:00
|
|
|
|
2010-07-19 22:33:33 +04:00
|
|
|
Event(RemoteDOMEvent aEvent);
|
2010-01-01 04:35:55 +03:00
|
|
|
|
2015-01-16 21:07:50 +03:00
|
|
|
sync CreateWindow(PBrowser aNewTab,
|
|
|
|
uint32_t aChromeFlags,
|
2014-06-20 22:07:47 +04:00
|
|
|
bool aCalledFromJS,
|
|
|
|
bool aPositionSpecified,
|
|
|
|
bool aSizeSpecified,
|
|
|
|
nsString aURI,
|
|
|
|
nsString aName,
|
|
|
|
nsString aFeatures,
|
|
|
|
nsString aBaseURI)
|
2015-01-23 07:00:18 +03:00
|
|
|
returns (bool windowOpened, FrameScriptInfo[] frameScripts, nsCString urlToLoad);
|
2010-02-20 20:05:20 +03:00
|
|
|
|
2013-11-06 21:21:15 +04:00
|
|
|
sync SyncMessage(nsString aMessage, ClonedMessageData aData,
|
|
|
|
CpowEntry[] aCpows, Principal aPrincipal)
|
2010-03-30 00:29:45 +04:00
|
|
|
returns (nsString[] retval);
|
|
|
|
|
2014-10-08 08:32:45 +04:00
|
|
|
prio(high) sync RpcMessage(nsString aMessage, ClonedMessageData aData,
|
|
|
|
CpowEntry[] aCpows, Principal aPrincipal)
|
2013-10-01 20:15:06 +04:00
|
|
|
returns (nsString[] retval);
|
|
|
|
|
2010-10-01 18:17:37 +04:00
|
|
|
/**
|
|
|
|
* The IME sequence number (seqno) parameter is used to make sure
|
|
|
|
* that a notification is discarded if it arrives at the chrome process
|
|
|
|
* too late. If the notification is late and we accept it, we will have
|
|
|
|
* an out-of-date view of the content process, which means events that we
|
|
|
|
* dispatch based on this out-of-date view will be wrong also.
|
|
|
|
* (see Bug 599550 and Bug 591047 comments 44, 50, and 54)
|
|
|
|
*
|
|
|
|
* Chrome increments seqno and includes it in each IME event sent to
|
|
|
|
* content, and content sends its current seqno back to chrome with each
|
|
|
|
* notification. A notification is up-to-date only if the content
|
|
|
|
* seqno is the same as the current chrome seqno, meaning no additional
|
|
|
|
* event was sent to content before the notification was received
|
|
|
|
*
|
|
|
|
* On blur, chrome returns the current seqno to content, and content
|
|
|
|
* uses it to discard subsequent events until the content seqno and
|
|
|
|
* chrome seqno-on-blur match again. These events, meant for the blurred
|
|
|
|
* textfield, are discarded to prevent events going to the wrong target
|
|
|
|
*/
|
|
|
|
|
2010-09-24 07:28:15 +04:00
|
|
|
/**
|
|
|
|
* Notifies chrome that there is a focus change involving an editable
|
|
|
|
* object (input, textarea, document, contentEditable. etc.)
|
|
|
|
*
|
2012-10-25 20:32:24 +04:00
|
|
|
* focus PR_TRUE if editable object is receiving focus
|
|
|
|
* PR_FALSE if losing focus
|
2010-09-24 07:28:15 +04:00
|
|
|
* preference Native widget preference for IME updates
|
2010-10-01 18:17:37 +04:00
|
|
|
* seqno Current seqno value on the chrome side
|
2010-09-24 07:28:15 +04:00
|
|
|
*/
|
2014-10-31 01:51:39 +03:00
|
|
|
prio(urgent) sync NotifyIMEFocus(bool focus)
|
2012-08-22 19:56:38 +04:00
|
|
|
returns (nsIMEUpdatePreference preference, uint32_t seqno);
|
2010-09-24 07:28:15 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Notifies chrome that there has been a change in text content
|
|
|
|
* One call can encompass both a delete and an insert operation
|
2012-10-25 20:32:24 +04:00
|
|
|
* Only called when NotifyIMEFocus returns PR_TRUE for mWantUpdates
|
2010-09-24 07:28:15 +04:00
|
|
|
*
|
|
|
|
* offset Starting offset of the change
|
|
|
|
* end Ending offset of the range deleted
|
|
|
|
* newEnd New ending offset after insertion
|
2014-02-26 04:48:02 +04:00
|
|
|
* causedByComposition true if the change is caused by composition
|
2010-09-24 07:28:15 +04:00
|
|
|
*
|
|
|
|
* for insertion, offset == end
|
|
|
|
* for deletion, offset == newEnd
|
|
|
|
*/
|
2014-10-31 01:51:39 +03:00
|
|
|
prio(urgent) async NotifyIMETextChange(uint32_t offset, uint32_t end,
|
|
|
|
uint32_t newEnd,
|
|
|
|
bool causedByComposition);
|
2010-09-24 07:28:15 +04:00
|
|
|
|
2013-11-07 04:11:11 +04:00
|
|
|
/**
|
|
|
|
* Notifies chrome that there is a IME compostion rect updated
|
|
|
|
*
|
|
|
|
* offset The starting offset of this rect
|
|
|
|
* rect The rect of first character of selected IME composition
|
2014-09-15 11:11:08 +04:00
|
|
|
* caretOffset The offset of caret position
|
2014-01-16 14:04:39 +04:00
|
|
|
* caretRect The rect of IME caret
|
2013-11-07 04:11:11 +04:00
|
|
|
*/
|
2014-10-31 01:51:39 +03:00
|
|
|
prio(urgent) async NotifyIMESelectedCompositionRect(uint32_t offset,
|
2015-02-04 23:21:03 +03:00
|
|
|
LayoutDeviceIntRect[] rect,
|
2014-10-31 01:51:39 +03:00
|
|
|
uint32_t caretOffset,
|
2015-02-04 23:21:03 +03:00
|
|
|
LayoutDeviceIntRect caretRect);
|
2013-11-07 04:11:11 +04:00
|
|
|
|
2010-09-24 07:28:15 +04:00
|
|
|
/**
|
|
|
|
* Notifies chrome that there has been a change in selection
|
2012-10-25 20:32:24 +04:00
|
|
|
* Only called when NotifyIMEFocus returns PR_TRUE for mWantUpdates
|
2010-09-24 07:28:15 +04:00
|
|
|
*
|
2010-10-01 18:17:37 +04:00
|
|
|
* seqno Current seqno value on the content side
|
2010-09-24 07:28:15 +04:00
|
|
|
* anchor Offset where the selection started
|
|
|
|
* focus Offset where the caret is
|
2014-12-05 05:15:43 +03:00
|
|
|
* writingMode CSS writing-mode in effect at the focus
|
2014-02-26 04:48:02 +04:00
|
|
|
* causedByComposition true if the change is caused by composition
|
2010-09-24 07:28:15 +04:00
|
|
|
*/
|
2014-10-31 01:51:39 +03:00
|
|
|
prio(urgent) async NotifyIMESelection(uint32_t seqno, uint32_t anchor,
|
2014-12-05 05:15:43 +03:00
|
|
|
uint32_t focus,
|
|
|
|
WritingMode writingMode,
|
|
|
|
bool causedByComposition);
|
2010-09-24 07:28:15 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Notifies chrome to refresh its text cache
|
|
|
|
*
|
|
|
|
* text The entire content of the text field
|
|
|
|
*/
|
2014-10-31 01:51:39 +03:00
|
|
|
prio(urgent) async NotifyIMETextHint(nsString text);
|
2010-09-24 07:28:15 +04:00
|
|
|
|
2014-09-11 17:46:17 +04:00
|
|
|
/**
|
|
|
|
* Notifies IME of mouse button event on a character in focused editor.
|
|
|
|
*
|
|
|
|
* Returns true if the mouse button event is consumd by IME.
|
|
|
|
*/
|
2014-10-31 01:51:39 +03:00
|
|
|
prio(urgent) sync NotifyIMEMouseButtonEvent(IMENotification notification)
|
2014-09-11 17:46:17 +04:00
|
|
|
returns (bool consumedByIME);
|
|
|
|
|
2014-12-15 12:21:20 +03:00
|
|
|
/**
|
|
|
|
* Notifies chrome to currect editor rect
|
|
|
|
*
|
|
|
|
* rect Rect of current focused editor
|
|
|
|
*/
|
2015-02-04 23:21:03 +03:00
|
|
|
prio(urgent) async NotifyIMEEditorRect(LayoutDeviceIntRect rect);
|
2014-12-15 12:21:20 +03:00
|
|
|
|
2014-12-15 12:37:00 +03:00
|
|
|
/**
|
|
|
|
* Notifies chrome to position change
|
|
|
|
*
|
|
|
|
* editorRect Rect of current focused editor
|
|
|
|
* compositionRects Rects of current composition string
|
|
|
|
*/
|
2015-02-04 23:21:03 +03:00
|
|
|
prio(urgent) async NotifyIMEPositionChange(LayoutDeviceIntRect editorRect,
|
|
|
|
LayoutDeviceIntRect[] compositionRects,
|
|
|
|
LayoutDeviceIntRect caretRect);
|
2014-12-15 12:37:00 +03:00
|
|
|
|
2010-09-24 07:28:15 +04:00
|
|
|
/**
|
|
|
|
* Instructs chrome to end any pending composition
|
|
|
|
*
|
2015-02-17 05:30:55 +03:00
|
|
|
* cancel true if composition should be cancelled
|
|
|
|
* noCompositionEvent true if no composition event is fired by commit or
|
|
|
|
* cancel
|
2010-09-24 07:28:15 +04:00
|
|
|
* composition Text to commit before ending the composition
|
|
|
|
*
|
2015-02-17 05:30:55 +03:00
|
|
|
* if cancel is true,
|
2010-09-24 07:28:15 +04:00
|
|
|
* widget should return empty string for composition
|
2015-02-17 05:30:55 +03:00
|
|
|
* if cancel is false,
|
2010-09-24 07:28:15 +04:00
|
|
|
* widget should return the current composition text
|
|
|
|
*/
|
2015-02-17 05:30:55 +03:00
|
|
|
prio(urgent) sync EndIMEComposition(bool cancel)
|
|
|
|
returns (bool noCompositionEvent, nsString composition);
|
2010-09-24 07:28:15 +04:00
|
|
|
|
2015-02-20 19:37:02 +03:00
|
|
|
/**
|
|
|
|
* Tells chrome to start plugin IME. If this results in a string getting
|
|
|
|
* committed, the result is in aCommitted (otherwise aCommitted is empty).
|
|
|
|
*
|
|
|
|
* aKeyboardEvent The event with which plugin IME is to be started
|
|
|
|
* panelX and panelY Location in screen coordinates of the IME input panel
|
|
|
|
* (should be just under the plugin)
|
|
|
|
* aCommitted The string committed during IME -- otherwise empty
|
|
|
|
*/
|
|
|
|
prio(urgent) sync StartPluginIME(WidgetKeyboardEvent aKeyboardEvent,
|
|
|
|
int32_t panelX, int32_t panelY)
|
|
|
|
returns (nsString aCommitted);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Tells chrome (and specifically the appropriate widget) whether or not
|
|
|
|
* a plugin (inside the widget) has the keyboard focus. Should be sent
|
|
|
|
* when the keyboard focus changes too or from a plugin.
|
|
|
|
*
|
|
|
|
* aFocused Whether or not a plugin is focused
|
|
|
|
*/
|
|
|
|
prio(urgent) async SetPluginFocused(bool aFocused);
|
|
|
|
|
2013-09-21 02:07:51 +04:00
|
|
|
/**
|
|
|
|
* Request that the parent process move focus to the browser's frame. If
|
|
|
|
* canRaise is true, the window can be raised if it is inactive.
|
|
|
|
*/
|
|
|
|
RequestFocus(bool canRaise);
|
|
|
|
|
2014-12-09 18:48:27 +03:00
|
|
|
/**
|
|
|
|
* Indicate, based on the current state, that some commands are enabled and
|
|
|
|
* some are disabled.
|
|
|
|
*/
|
|
|
|
EnableDisableCommands(nsString action,
|
|
|
|
nsCString[] enabledCommands,
|
|
|
|
nsCString[] disabledCommands);
|
|
|
|
|
2014-10-31 01:51:39 +03:00
|
|
|
prio(urgent) sync GetInputContext() returns (int32_t IMEEnabled,
|
|
|
|
int32_t IMEOpen,
|
|
|
|
intptr_t NativeIMEContext);
|
|
|
|
|
2015-01-21 01:01:24 +03:00
|
|
|
prio(urgent) async SetInputContext(int32_t IMEEnabled,
|
|
|
|
int32_t IMEOpen,
|
|
|
|
nsString type,
|
|
|
|
nsString inputmode,
|
|
|
|
nsString actionHint,
|
|
|
|
int32_t cause,
|
|
|
|
int32_t focusChange);
|
2010-09-24 07:28:15 +04:00
|
|
|
|
2014-04-05 01:50:42 +04:00
|
|
|
sync IsParentWindowMainWidgetVisible() returns (bool visible);
|
|
|
|
|
2010-12-03 04:24:04 +03:00
|
|
|
/**
|
|
|
|
* Gets the DPI of the screen corresponding to this browser.
|
|
|
|
*/
|
|
|
|
sync GetDPI() returns (float value);
|
|
|
|
|
2013-05-02 03:06:19 +04:00
|
|
|
/**
|
|
|
|
* Gets the default scaling factor of the screen corresponding to this browser.
|
|
|
|
*/
|
|
|
|
sync GetDefaultScale() returns (double value);
|
|
|
|
|
2014-05-28 05:12:29 +04:00
|
|
|
/**
|
|
|
|
* Set the native cursor.
|
|
|
|
* @param value
|
|
|
|
* The widget cursor to set.
|
|
|
|
* @param force
|
|
|
|
* Invalidate any locally cached cursor settings and force an
|
|
|
|
* update.
|
|
|
|
*/
|
|
|
|
SetCursor(uint32_t value, bool force);
|
|
|
|
|
2011-10-21 02:17:09 +04:00
|
|
|
SetBackgroundColor(nscolor color);
|
2011-06-22 04:32:43 +04:00
|
|
|
|
2013-07-25 23:45:31 +04:00
|
|
|
/**
|
|
|
|
* Used to set the current text of the status tooltip.
|
|
|
|
* Nowadays this is mainly used for link locations on hover.
|
|
|
|
*/
|
|
|
|
SetStatus(uint32_t type, nsString status);
|
|
|
|
|
2014-01-23 00:27:23 +04:00
|
|
|
/**
|
|
|
|
* Show/hide a tooltip when the mouse hovers over an element in the content
|
|
|
|
* document.
|
|
|
|
*/
|
|
|
|
ShowTooltip(uint32_t x, uint32_t y, nsString tooltip);
|
|
|
|
HideTooltip();
|
|
|
|
|
2014-02-24 00:19:43 +04:00
|
|
|
/**
|
|
|
|
* Create an asynchronous color picker on the parent side,
|
|
|
|
* but don't open it yet.
|
|
|
|
*/
|
|
|
|
PColorPicker(nsString title, nsString initialColor);
|
|
|
|
|
2012-07-30 18:58:26 +04:00
|
|
|
/**
|
|
|
|
* Initiates an asynchronous request for permission for the
|
|
|
|
* provided principal.
|
|
|
|
*
|
2014-02-10 00:34:40 +04:00
|
|
|
* @param aRequests
|
|
|
|
* The array of permissions to request.
|
2012-07-30 18:58:26 +04:00
|
|
|
* @param aPrincipal
|
|
|
|
* The principal of the request.
|
|
|
|
*
|
|
|
|
* NOTE: The principal is untrusted in the parent process. Only
|
|
|
|
* principals that can live in the content process should
|
|
|
|
* provided.
|
|
|
|
*/
|
2014-02-10 00:34:40 +04:00
|
|
|
PContentPermissionRequest(PermissionRequest[] aRequests, Principal aPrincipal);
|
2010-05-13 21:44:51 +04:00
|
|
|
|
2014-02-18 04:30:06 +04:00
|
|
|
PFilePicker(nsString aTitle, int16_t aMode);
|
|
|
|
|
2014-09-27 03:21:57 +04:00
|
|
|
/**
|
|
|
|
* Initiates an asynchronous request for one of the special indexedDB
|
|
|
|
* permissions for the provided principal.
|
|
|
|
*
|
|
|
|
* @param principal
|
|
|
|
* The principal of the request.
|
|
|
|
*
|
|
|
|
* NOTE: The principal is untrusted in the parent process. Only
|
|
|
|
* principals that can live in the content process should
|
|
|
|
* provided.
|
|
|
|
*/
|
|
|
|
PIndexedDBPermissionRequest(Principal principal);
|
|
|
|
|
2012-06-13 02:01:25 +04:00
|
|
|
/**
|
|
|
|
* window.open from inside <iframe mozbrowser> is special. When the child
|
|
|
|
* process calls window.open, it creates a new PBrowser (in its own
|
|
|
|
* process), then calls BrowserFrameOpenWindow on it.
|
|
|
|
*
|
|
|
|
* The parent process gets a chance to accept or reject the window.open
|
|
|
|
* call, and windowOpened is set to true if we ended up going through with
|
|
|
|
* the window.open.
|
|
|
|
*
|
|
|
|
* @param opener the PBrowser whose content called window.open.
|
|
|
|
*/
|
|
|
|
sync BrowserFrameOpenWindow(PBrowser opener, nsString aURL,
|
|
|
|
nsString aName, nsString aFeatures)
|
|
|
|
returns (bool windowOpened);
|
|
|
|
|
2012-08-09 08:39:02 +04:00
|
|
|
/**
|
|
|
|
* Instructs the TabParent to forward a request to zoom to a rect given in
|
|
|
|
* CSS pixels. This rect is relative to the document.
|
|
|
|
*/
|
2013-11-13 22:20:30 +04:00
|
|
|
ZoomToRect(uint32_t aPresShellId, ViewID aViewId, CSSRect aRect);
|
2012-08-09 08:39:02 +04:00
|
|
|
|
2012-08-22 08:37:06 +04:00
|
|
|
/**
|
|
|
|
* We know for sure that content has either preventDefaulted or not
|
|
|
|
* preventDefaulted. This applies to an entire batch of touch events. It is
|
|
|
|
* expected that, if there are any DOM touch listeners, touch events will be
|
|
|
|
* batched and only processed for panning and zooming if content does not
|
|
|
|
* preventDefault.
|
|
|
|
*/
|
2014-12-09 13:35:12 +03:00
|
|
|
ContentReceivedInputBlock(ScrollableLayerGuid aGuid, uint64_t aInputBlockId, bool aPreventDefault);
|
2012-08-22 08:37:06 +04:00
|
|
|
|
2014-11-22 05:36:25 +03:00
|
|
|
/**
|
|
|
|
* Notifies the APZ code of the results of the gecko hit-test for a
|
|
|
|
* particular input block. Each target corresponds to one touch point in the
|
|
|
|
* touch event.
|
|
|
|
*/
|
|
|
|
SetTargetAPZC(uint64_t aInputBlockId, ScrollableLayerGuid[] aTargets);
|
|
|
|
|
2012-09-29 06:18:18 +04:00
|
|
|
/**
|
2015-03-19 13:33:33 +03:00
|
|
|
* Notifies the APZ code of the allowed touch-behaviours for a particular
|
|
|
|
* input block. Each item in the aFlags array corresponds to one touch point
|
|
|
|
* in the touch event.
|
|
|
|
*/
|
|
|
|
SetAllowedTouchBehavior(uint64_t aInputBlockId, TouchBehaviorFlags[] aFlags);
|
|
|
|
|
|
|
|
/**
|
2013-11-14 21:35:41 +04:00
|
|
|
* Updates the zoom constraints for a scrollable frame in this tab.
|
|
|
|
* The zoom controller code lives on the parent side and so this allows it to
|
|
|
|
* have up-to-date zoom constraints.
|
2012-09-29 06:18:18 +04:00
|
|
|
*/
|
2013-11-09 04:07:00 +04:00
|
|
|
UpdateZoomConstraints(uint32_t aPresShellId, ViewID aViewId, bool aIsRoot,
|
2014-01-06 22:26:44 +04:00
|
|
|
ZoomConstraints aConstraints);
|
2012-09-29 06:18:18 +04:00
|
|
|
|
2014-06-11 09:44:36 +04:00
|
|
|
/**
|
|
|
|
* Brings up the auth prompt dialog.
|
|
|
|
* Called when this is the PBrowserParent for a nested remote iframe.
|
|
|
|
* aCallbackId corresponds to an nsIAuthPromptCallback that lives in the
|
|
|
|
* root process. It will be passed back to the root process with either the
|
|
|
|
* OnAuthAvailable or OnAuthCancelled message.
|
|
|
|
*/
|
|
|
|
AsyncAuthPrompt(nsCString uri, nsString realm, uint64_t aCallbackId);
|
|
|
|
|
2010-08-06 02:11:23 +04:00
|
|
|
__delete__();
|
|
|
|
|
2014-03-18 19:16:47 +04:00
|
|
|
ReplyKeyEvent(WidgetKeyboardEvent event);
|
|
|
|
|
2014-11-03 10:05:38 +03:00
|
|
|
DispatchAfterKeyboardEvent(WidgetKeyboardEvent event);
|
|
|
|
|
2014-04-22 00:40:09 +04:00
|
|
|
sync RequestNativeKeyBindings(WidgetKeyboardEvent event)
|
|
|
|
returns (MaybeNativeKeyBinding bindings);
|
|
|
|
|
2014-05-23 22:19:00 +04:00
|
|
|
/**
|
|
|
|
* Child informs the parent that the graphics objects are ready for
|
|
|
|
* compositing. This is sent when all pending changes have been
|
|
|
|
* sent to the compositor and are ready to be shown on the next composite.
|
|
|
|
* @see PCompositor
|
|
|
|
* @see RequestNotifyAfterRemotePaint
|
|
|
|
*/
|
|
|
|
async RemotePaintIsReady();
|
|
|
|
|
2014-11-16 21:23:22 +03:00
|
|
|
sync GetRenderFrameInfo(PRenderFrame aRenderFrame)
|
2015-02-26 16:47:01 +03:00
|
|
|
returns (TextureFactoryIdentifier textureFactoryIdentifier,
|
2014-11-16 21:23:22 +03:00
|
|
|
uint64_t layersId);
|
|
|
|
|
2015-01-13 03:41:53 +03:00
|
|
|
/**
|
|
|
|
* Sent by the child to the parent to inform it that an update to the
|
|
|
|
* dimensions has been requested, likely through win.moveTo or resizeTo
|
|
|
|
*/
|
|
|
|
async SetDimensions(uint32_t aFlags, int32_t aX, int32_t aY, int32_t aCx, int32_t aCy);
|
|
|
|
|
2015-03-07 01:26:59 +03:00
|
|
|
prio(high) sync SynthesizedMouseWheelEvent(WidgetWheelEvent event);
|
|
|
|
|
2009-09-10 02:00:14 +04:00
|
|
|
child:
|
2010-08-21 03:24:40 +04:00
|
|
|
/**
|
|
|
|
* Notify the remote browser that it has been Show()n on this
|
|
|
|
* side, with the given |visibleRect|. This message is expected
|
|
|
|
* to trigger creation of the remote browser's "widget".
|
|
|
|
*
|
|
|
|
* |Show()| and |Move()| take IntSizes rather than Rects because
|
|
|
|
* content processes always render to a virtual <0, 0> top-left
|
|
|
|
* point.
|
|
|
|
*/
|
2015-03-05 12:13:05 +03:00
|
|
|
Show(ScreenIntSize size,
|
2014-11-24 22:05:35 +03:00
|
|
|
ShowInfo info,
|
2014-11-16 21:23:22 +03:00
|
|
|
TextureFactoryIdentifier textureFactoryIdentifier,
|
|
|
|
uint64_t layersId,
|
2015-02-06 19:26:29 +03:00
|
|
|
nullable PRenderFrame renderFrame,
|
|
|
|
bool parentIsActive);
|
2009-10-28 23:41:46 +03:00
|
|
|
|
2015-02-11 14:53:00 +03:00
|
|
|
LoadURL(nsCString uri, BrowserConfiguration config);
|
2009-09-10 02:00:14 +04:00
|
|
|
|
2013-02-16 02:27:21 +04:00
|
|
|
CacheFileDescriptor(nsString path, FileDescriptor fd);
|
|
|
|
|
2015-03-05 12:13:05 +03:00
|
|
|
UpdateDimensions(nsIntRect rect, ScreenIntSize size, ScreenOrientation orientation,
|
2014-12-11 17:44:07 +03:00
|
|
|
nsIntPoint chromeDisp) compress;
|
2009-10-29 20:58:31 +03:00
|
|
|
|
2014-03-21 01:34:41 +04:00
|
|
|
UpdateFrame(FrameMetrics frame);
|
2012-08-09 08:39:02 +04:00
|
|
|
|
2014-07-16 16:33:50 +04:00
|
|
|
// The following methods correspond to functions on the GeckoContentController
|
|
|
|
// interface in gfx/layers/apz/public/GeckoContentController.h. Refer to documentation
|
|
|
|
// in that file for these functions.
|
2015-02-20 02:53:30 +03:00
|
|
|
RequestFlingSnap(ViewID aScrollID, CSSPoint aDestination);
|
2014-02-06 02:43:20 +04:00
|
|
|
AcknowledgeScrollUpdate(ViewID aScrollId, uint32_t aScrollGeneration);
|
2015-03-03 00:41:02 +03:00
|
|
|
HandleDoubleTap(CSSPoint aPoint, Modifiers aModifiers, ScrollableLayerGuid aGuid);
|
|
|
|
HandleSingleTap(CSSPoint aPoint, Modifiers aModifiers, ScrollableLayerGuid aGuid);
|
|
|
|
HandleLongTap(CSSPoint point, Modifiers aModifiers, ScrollableLayerGuid aGuid, uint64_t aInputBlockId);
|
2014-04-15 21:39:20 +04:00
|
|
|
NotifyAPZStateChange(ViewID aViewId, APZStateChange aChange, int aArg);
|
2013-12-10 07:14:55 +04:00
|
|
|
|
2014-07-16 16:33:50 +04:00
|
|
|
|
2009-11-05 21:14:22 +03:00
|
|
|
/**
|
|
|
|
* Sending an activate message moves focus to the child.
|
|
|
|
*/
|
2010-07-19 22:33:33 +04:00
|
|
|
Activate();
|
2010-03-19 09:52:18 +03:00
|
|
|
|
2011-06-18 04:08:32 +04:00
|
|
|
Deactivate();
|
|
|
|
|
2014-11-27 16:28:26 +03:00
|
|
|
ParentActivated(bool aActivated);
|
|
|
|
|
2009-11-17 17:22:23 +03:00
|
|
|
/**
|
2010-07-19 22:33:33 +04:00
|
|
|
* @see nsIDOMWindowUtils sendMouseEvent.
|
|
|
|
*/
|
|
|
|
MouseEvent(nsString aType,
|
|
|
|
float aX,
|
|
|
|
float aY,
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t aButton,
|
|
|
|
int32_t aClickCount,
|
|
|
|
int32_t aModifiers,
|
2010-07-19 22:33:33 +04:00
|
|
|
bool aIgnoreRootScrollFrame);
|
|
|
|
|
2015-02-14 02:34:04 +03:00
|
|
|
/**
|
|
|
|
* When two consecutive mouse move events would be added to the message queue,
|
|
|
|
* they are 'compressed' by dumping the oldest one.
|
|
|
|
*/
|
|
|
|
RealMouseMoveEvent(WidgetMouseEvent event) compress;
|
|
|
|
RealMouseButtonEvent(WidgetMouseEvent event);
|
2014-03-20 19:46:29 +04:00
|
|
|
RealKeyEvent(WidgetKeyboardEvent event, MaybeNativeKeyBinding keyBinding);
|
2014-12-09 13:40:26 +03:00
|
|
|
MouseWheelEvent(WidgetWheelEvent event, ScrollableLayerGuid aGuid, uint64_t aInputBlockId);
|
2014-10-24 21:29:30 +04:00
|
|
|
RealTouchEvent(WidgetTouchEvent aEvent, ScrollableLayerGuid aGuid, uint64_t aInputBlockId);
|
2014-11-08 01:21:08 +03:00
|
|
|
RealTouchMoveEvent(WidgetTouchEvent aEvent, ScrollableLayerGuid aGuid, uint64_t aInputBlockId);
|
2011-06-22 04:32:43 +04:00
|
|
|
|
2010-07-19 22:33:33 +04:00
|
|
|
/**
|
|
|
|
* @see nsIDOMWindowUtils sendKeyEvent.
|
2009-11-17 17:22:23 +03:00
|
|
|
*/
|
2010-07-19 22:33:33 +04:00
|
|
|
KeyEvent(nsString aType,
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t aKeyCode,
|
|
|
|
int32_t aCharCode,
|
|
|
|
int32_t aModifiers,
|
2010-07-19 22:33:33 +04:00
|
|
|
bool aPreventDefault);
|
2009-11-17 17:22:23 +03:00
|
|
|
|
2013-10-01 11:23:00 +04:00
|
|
|
CompositionEvent(WidgetCompositionEvent event);
|
2010-08-17 12:07:42 +04:00
|
|
|
|
2013-10-01 11:23:01 +04:00
|
|
|
SelectionEvent(WidgetSelectionEvent event);
|
2010-08-17 12:07:42 +04:00
|
|
|
|
2010-07-19 22:33:33 +04:00
|
|
|
/**
|
|
|
|
* Activate event forwarding from client to parent.
|
|
|
|
*/
|
|
|
|
ActivateFrameEvent(nsString aType, bool capture);
|
2010-02-20 20:05:20 +03:00
|
|
|
|
2013-11-24 09:32:45 +04:00
|
|
|
LoadRemoteScript(nsString aURL, bool aRunInGlobalScope);
|
2010-02-20 20:05:20 +03:00
|
|
|
|
2010-10-27 02:20:53 +04:00
|
|
|
/**
|
|
|
|
* Create a asynchronous request to render whatever document is
|
|
|
|
* loaded in the child when this message arrives. When the
|
|
|
|
* request finishes, PDocumentRenderer:__delete__ is sent back to
|
|
|
|
* this side to notify completion.
|
|
|
|
*
|
2010-10-27 02:20:53 +04:00
|
|
|
* |documentRect| is the area of the remote document to draw,
|
|
|
|
* transformed by |transform|. The rendered area will have the
|
|
|
|
* default background color |bgcolor|. |renderFlags| are the
|
|
|
|
* nsIPresShell::RenderDocument() flags to use on the remote side,
|
|
|
|
* and if true, |flushLayout| will do just that before rendering
|
2010-10-27 02:20:53 +04:00
|
|
|
* the document. The rendered image will be of size |renderSize|.
|
2010-10-27 02:20:53 +04:00
|
|
|
*/
|
2013-12-26 22:06:53 +04:00
|
|
|
PDocumentRenderer(nsRect documentRect, Matrix transform,
|
2010-10-27 02:20:53 +04:00
|
|
|
nsString bgcolor,
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t renderFlags, bool flushLayout,
|
2010-10-27 02:20:53 +04:00
|
|
|
nsIntSize renderSize);
|
2010-03-24 13:47:18 +03:00
|
|
|
|
2010-08-06 02:11:23 +04:00
|
|
|
/**
|
|
|
|
* Sent by the chrome process when it no longer wants this remote
|
|
|
|
* <browser>. The child side cleans up in response, then
|
|
|
|
* finalizing its death by sending back __delete__() to the
|
|
|
|
* parent.
|
|
|
|
*/
|
|
|
|
Destroy();
|
|
|
|
|
2013-08-13 11:56:57 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Tell the child side if it has to update it's touchable region
|
|
|
|
* to the parent.
|
|
|
|
*/
|
|
|
|
SetUpdateHitRegion(bool aEnabled);
|
|
|
|
|
2014-02-20 15:26:13 +04:00
|
|
|
/**
|
|
|
|
* Tell the child to update its docShell's active state.
|
|
|
|
*/
|
|
|
|
SetIsDocShellActive(bool aIsActive);
|
|
|
|
|
2014-05-23 22:19:00 +04:00
|
|
|
/**
|
|
|
|
* The parent (chrome thread) requests that the child inform it when
|
|
|
|
* the graphics objects are ready to display.
|
|
|
|
* @see PCompositor
|
|
|
|
* @see RemotePaintIsReady
|
|
|
|
*/
|
|
|
|
async RequestNotifyAfterRemotePaint();
|
|
|
|
|
2014-05-23 18:36:50 +04:00
|
|
|
/**
|
|
|
|
* Tell the child that the UI resolution changed for the containing
|
|
|
|
* window.
|
|
|
|
*/
|
|
|
|
UIResolutionChanged();
|
|
|
|
|
2014-08-23 03:17:18 +04:00
|
|
|
/**
|
|
|
|
* Tell the child of an app's offline status
|
|
|
|
*/
|
|
|
|
AppOfflineStatus(uint32_t id, bool offline);
|
|
|
|
|
2010-08-06 02:11:23 +04:00
|
|
|
/*
|
|
|
|
* FIXME: write protocol!
|
|
|
|
|
|
|
|
state LIVE:
|
|
|
|
send LoadURL goto LIVE;
|
|
|
|
//etc.
|
|
|
|
send Destroy goto DYING;
|
|
|
|
|
|
|
|
state DYING:
|
|
|
|
discard send blah;
|
|
|
|
// etc.
|
|
|
|
recv __delete__;
|
|
|
|
*/
|
2009-08-26 03:07:22 +04:00
|
|
|
};
|
|
|
|
|
2009-09-10 02:00:14 +04:00
|
|
|
}
|
2012-07-30 18:58:26 +04:00
|
|
|
}
|