2009-09-09 15:00:14 -07:00
|
|
|
/* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8 -*- */
|
2009-08-18 12:05:15 -07:00
|
|
|
/* vim: set sw=4 ts=8 et tw=80 ft=cpp : */
|
|
|
|
|
2012-05-21 04:12:37 -07: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-25 16:07:22 -07:00
|
|
|
|
2012-08-01 23:02:29 -07:00
|
|
|
include protocol PBlob;
|
2014-02-23 12:19:43 -08:00
|
|
|
include protocol PColorPicker;
|
2010-07-19 11:33:33 -07:00
|
|
|
include protocol PContent;
|
2010-04-27 00:12:38 -07:00
|
|
|
include protocol PDocumentRenderer;
|
2010-09-09 22:00:08 -07:00
|
|
|
include protocol PContentPermissionRequest;
|
2014-02-17 16:30:06 -08:00
|
|
|
include protocol PFilePicker;
|
2010-08-20 16:24:41 -07:00
|
|
|
include protocol PRenderFrame;
|
2010-10-20 10:12:32 -07:00
|
|
|
include protocol POfflineCacheUpdate;
|
2012-06-01 10:21:12 -07:00
|
|
|
include protocol PIndexedDB;
|
2012-08-23 12:33:46 -07:00
|
|
|
include DOMTypes;
|
2013-07-10 15:05:39 -07:00
|
|
|
include JavaScriptTypes;
|
2012-08-23 12:33:46 -07:00
|
|
|
include URIParams;
|
2014-02-09 12:34:40 -08:00
|
|
|
include PContentPermission;
|
2009-09-09 15:00:14 -07:00
|
|
|
|
2012-08-01 23:02:29 -07:00
|
|
|
|
2013-10-01 12:25:07 -07:00
|
|
|
using class IPC::Principal from "mozilla/dom/PermissionMessageUtils.h";
|
2013-12-26 10:06:53 -08:00
|
|
|
using struct mozilla::gfx::Matrix from "mozilla/gfx/Matrix.h";
|
2013-10-01 12:25:07 -07:00
|
|
|
using struct gfxSize from "gfxPoint.h";
|
|
|
|
using CSSRect from "Units.h";
|
|
|
|
using struct mozilla::layers::FrameMetrics from "FrameMetrics.h";
|
2013-11-13 10:20:31 -08:00
|
|
|
using struct mozilla::layers::ScrollableLayerGuid from "FrameMetrics.h";
|
2014-01-06 10:26:44 -08:00
|
|
|
using struct mozilla::layers::ZoomConstraints from "FrameMetrics.h";
|
2013-10-01 12:25:07 -07:00
|
|
|
using FrameMetrics::ViewID from "FrameMetrics.h";
|
|
|
|
using mozilla::layout::ScrollingBehavior from "mozilla/layout/RenderFrameUtils.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";
|
|
|
|
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::WidgetTextEvent 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 12:27:45 -07:00
|
|
|
using mozilla::CSSPoint from "Units.h";
|
2013-10-01 12:25:07 -07:00
|
|
|
using mozilla::CSSToScreenScale from "Units.h";
|
2014-03-20 08:46:29 -07:00
|
|
|
using mozilla::CommandInt from "mozilla/EventForwards.h";
|
2014-04-11 17:27:57 -07:00
|
|
|
using mozilla::layers::GeckoContentController::APZStateChange from "mozilla/layers/GeckoContentController.h";
|
2013-10-01 12:25:07 -07:00
|
|
|
|
2009-08-25 16:07:22 -07:00
|
|
|
namespace mozilla {
|
2009-09-09 15:00:14 -07:00
|
|
|
namespace dom {
|
2009-08-25 16:07:22 -07:00
|
|
|
|
2014-03-20 08:46:29 -07:00
|
|
|
struct NativeKeyBinding
|
|
|
|
{
|
|
|
|
CommandInt[] singleLineCommands;
|
|
|
|
CommandInt[] multiLineCommands;
|
|
|
|
CommandInt[] richTextCommands;
|
|
|
|
};
|
|
|
|
|
|
|
|
union MaybeNativeKeyBinding
|
|
|
|
{
|
|
|
|
NativeKeyBinding;
|
|
|
|
void_t;
|
|
|
|
};
|
|
|
|
|
2013-09-30 17:27:45 -07:00
|
|
|
intr protocol PBrowser
|
2009-08-25 16:07:22 -07:00
|
|
|
{
|
2010-07-19 11:33:33 -07:00
|
|
|
manager PContent;
|
|
|
|
|
2014-02-23 12:19:43 -08:00
|
|
|
manages PColorPicker;
|
2009-10-29 10:58:31 -07:00
|
|
|
manages PDocumentRenderer;
|
2010-09-09 22:00:08 -07:00
|
|
|
manages PContentPermissionRequest;
|
2014-02-17 16:30:06 -08:00
|
|
|
manages PFilePicker;
|
2010-08-20 16:24:41 -07:00
|
|
|
manages PRenderFrame;
|
2010-10-20 10:12:32 -07:00
|
|
|
manages POfflineCacheUpdate;
|
2012-06-01 10:21:12 -07:00
|
|
|
manages PIndexedDB;
|
2010-07-19 11:33:33 -07:00
|
|
|
|
|
|
|
both:
|
2013-11-06 09:21:15 -08:00
|
|
|
AsyncMessage(nsString aMessage, ClonedMessageData aData, CpowEntry[] aCpows,
|
|
|
|
Principal aPrincipal);
|
2009-09-09 15:00:14 -07:00
|
|
|
|
2009-11-05 10:14:22 -08:00
|
|
|
parent:
|
|
|
|
/**
|
|
|
|
* When child sends this message, parent should move focus to
|
|
|
|
* the next or previous focusable element.
|
|
|
|
*/
|
2010-07-19 11:33:33 -07:00
|
|
|
MoveFocus(bool forward);
|
2009-11-05 10:14:22 -08:00
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
Event(RemoteDOMEvent aEvent);
|
2009-12-31 17:35:55 -08:00
|
|
|
|
2013-09-30 17:27:45 -07:00
|
|
|
intr CreateWindow() returns (PBrowser window);
|
2010-02-20 09:05:20 -08:00
|
|
|
|
2013-11-06 09:21:15 -08:00
|
|
|
sync SyncMessage(nsString aMessage, ClonedMessageData aData,
|
|
|
|
CpowEntry[] aCpows, Principal aPrincipal)
|
2010-03-29 13:29:45 -07:00
|
|
|
returns (nsString[] retval);
|
|
|
|
|
2013-11-06 09:21:15 -08:00
|
|
|
rpc RpcMessage(nsString aMessage, ClonedMessageData aData,
|
|
|
|
CpowEntry[] aCpows, Principal aPrincipal)
|
2013-10-01 09:15:06 -07:00
|
|
|
returns (nsString[] retval);
|
|
|
|
|
2010-10-01 07:17:37 -07: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-23 20:28:15 -07:00
|
|
|
/**
|
|
|
|
* Notifies chrome that there is a focus change involving an editable
|
|
|
|
* object (input, textarea, document, contentEditable. etc.)
|
|
|
|
*
|
2012-10-25 09:32:24 -07:00
|
|
|
* focus PR_TRUE if editable object is receiving focus
|
|
|
|
* PR_FALSE if losing focus
|
2010-09-23 20:28:15 -07:00
|
|
|
* preference Native widget preference for IME updates
|
2010-10-01 07:17:37 -07:00
|
|
|
* seqno Current seqno value on the chrome side
|
2010-09-23 20:28:15 -07:00
|
|
|
*/
|
2011-09-28 23:19:26 -07:00
|
|
|
sync NotifyIMEFocus(bool focus)
|
2012-08-22 08:56:38 -07:00
|
|
|
returns (nsIMEUpdatePreference preference, uint32_t seqno);
|
2010-09-23 20:28:15 -07: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 09:32:24 -07:00
|
|
|
* Only called when NotifyIMEFocus returns PR_TRUE for mWantUpdates
|
2010-09-23 20:28:15 -07:00
|
|
|
*
|
|
|
|
* offset Starting offset of the change
|
|
|
|
* end Ending offset of the range deleted
|
|
|
|
* newEnd New ending offset after insertion
|
2014-02-25 16:48:02 -08:00
|
|
|
* causedByComposition true if the change is caused by composition
|
2010-09-23 20:28:15 -07:00
|
|
|
*
|
|
|
|
* for insertion, offset == end
|
|
|
|
* for deletion, offset == newEnd
|
|
|
|
*/
|
2014-02-25 16:48:02 -08:00
|
|
|
NotifyIMETextChange(uint32_t offset, uint32_t end, uint32_t newEnd,
|
|
|
|
bool causedByComposition);
|
2010-09-23 20:28:15 -07:00
|
|
|
|
2013-11-06 16:11:11 -08: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-01-16 02:04:39 -08:00
|
|
|
* caretRect The rect of IME caret
|
2013-11-06 16:11:11 -08:00
|
|
|
*/
|
2014-01-16 02:04:39 -08:00
|
|
|
NotifyIMESelectedCompositionRect(uint32_t offset, nsIntRect rect, nsIntRect caretRect);
|
2013-11-06 16:11:11 -08:00
|
|
|
|
2010-09-23 20:28:15 -07:00
|
|
|
/**
|
|
|
|
* Notifies chrome that there has been a change in selection
|
2012-10-25 09:32:24 -07:00
|
|
|
* Only called when NotifyIMEFocus returns PR_TRUE for mWantUpdates
|
2010-09-23 20:28:15 -07:00
|
|
|
*
|
2010-10-01 07:17:37 -07:00
|
|
|
* seqno Current seqno value on the content side
|
2010-09-23 20:28:15 -07:00
|
|
|
* anchor Offset where the selection started
|
|
|
|
* focus Offset where the caret is
|
2014-02-25 16:48:02 -08:00
|
|
|
* causedByComposition true if the change is caused by composition
|
2010-09-23 20:28:15 -07:00
|
|
|
*/
|
2014-02-25 16:48:02 -08:00
|
|
|
NotifyIMESelection(uint32_t seqno, uint32_t anchor, uint32_t focus,
|
|
|
|
bool causedByComposition);
|
2010-09-23 20:28:15 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Notifies chrome to refresh its text cache
|
|
|
|
*
|
|
|
|
* text The entire content of the text field
|
|
|
|
*/
|
|
|
|
NotifyIMETextHint(nsString text);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Instructs chrome to end any pending composition
|
|
|
|
*
|
2012-10-25 09:32:24 -07:00
|
|
|
* cancel PR_TRUE if composition should be cancelled
|
2010-09-23 20:28:15 -07:00
|
|
|
* composition Text to commit before ending the composition
|
|
|
|
*
|
2012-10-25 09:32:24 -07:00
|
|
|
* if cancel is PR_TRUE,
|
2010-09-23 20:28:15 -07:00
|
|
|
* widget should return empty string for composition
|
2012-10-25 09:32:24 -07:00
|
|
|
* if cancel is PR_FALSE,
|
2010-09-23 20:28:15 -07:00
|
|
|
* widget should return the current composition text
|
|
|
|
*/
|
2011-09-28 23:19:26 -07:00
|
|
|
sync EndIMEComposition(bool cancel) returns (nsString composition);
|
2010-09-23 20:28:15 -07:00
|
|
|
|
2013-09-20 15:07:51 -07: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);
|
|
|
|
|
2012-10-26 16:35:20 -07:00
|
|
|
sync GetInputContext() returns (int32_t IMEEnabled, int32_t IMEOpen,
|
2012-10-29 18:58:29 -07:00
|
|
|
intptr_t NativeIMEContext);
|
2010-09-23 20:28:15 -07:00
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
SetInputContext(int32_t IMEEnabled,
|
|
|
|
int32_t IMEOpen,
|
2011-11-27 03:51:52 -08:00
|
|
|
nsString type,
|
2012-08-26 19:16:22 -07:00
|
|
|
nsString inputmode,
|
2011-11-27 03:51:52 -08:00
|
|
|
nsString actionHint,
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t cause,
|
|
|
|
int32_t focusChange);
|
2010-09-23 20:28:15 -07:00
|
|
|
|
2014-04-04 14:50:42 -07:00
|
|
|
sync IsParentWindowMainWidgetVisible() returns (bool visible);
|
|
|
|
|
2010-12-02 17:24:04 -08:00
|
|
|
/**
|
|
|
|
* Gets the DPI of the screen corresponding to this browser.
|
|
|
|
*/
|
|
|
|
sync GetDPI() returns (float value);
|
|
|
|
|
2013-05-01 16:06:19 -07:00
|
|
|
/**
|
|
|
|
* Gets the default scaling factor of the screen corresponding to this browser.
|
|
|
|
*/
|
|
|
|
sync GetDefaultScale() returns (double value);
|
|
|
|
|
2011-07-21 17:49:35 -07:00
|
|
|
/**
|
|
|
|
* Return native data of root widget
|
|
|
|
*/
|
|
|
|
sync GetWidgetNativeData() returns (WindowsHandle value);
|
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
SetCursor(uint32_t value);
|
2011-10-20 15:17:09 -07:00
|
|
|
SetBackgroundColor(nscolor color);
|
2011-06-21 17:32:43 -07:00
|
|
|
|
2013-07-25 12:45:31 -07: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-22 12:27:23 -08: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-23 12:19:43 -08:00
|
|
|
/**
|
|
|
|
* Create an asynchronous color picker on the parent side,
|
|
|
|
* but don't open it yet.
|
|
|
|
*/
|
|
|
|
PColorPicker(nsString title, nsString initialColor);
|
|
|
|
|
2012-07-30 07:58:26 -07:00
|
|
|
/**
|
|
|
|
* Initiates an asynchronous request for permission for the
|
|
|
|
* provided principal.
|
|
|
|
*
|
2014-02-09 12:34:40 -08:00
|
|
|
* @param aRequests
|
|
|
|
* The array of permissions to request.
|
2012-07-30 07:58:26 -07: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-09 12:34:40 -08:00
|
|
|
PContentPermissionRequest(PermissionRequest[] aRequests, Principal aPrincipal);
|
2010-05-13 10:44:51 -07:00
|
|
|
|
2014-02-17 16:30:06 -08:00
|
|
|
PFilePicker(nsString aTitle, int16_t aMode);
|
|
|
|
|
2010-08-20 16:24:41 -07:00
|
|
|
/**
|
|
|
|
* Create a layout frame (encapsulating a remote layer tree) for
|
|
|
|
* the page that is currently loaded in the <browser>.
|
|
|
|
*/
|
2014-01-15 13:10:39 -08:00
|
|
|
sync PRenderFrame();
|
|
|
|
|
|
|
|
sync InitRenderFrame(PRenderFrame aFrame)
|
2012-07-19 23:48:27 -07:00
|
|
|
returns (ScrollingBehavior scrolling,
|
2014-01-15 13:10:39 -08:00
|
|
|
TextureFactoryIdentifier textureFactoryIdentifier, uint64_t layersId,
|
|
|
|
bool success);
|
2010-08-20 16:24:41 -07:00
|
|
|
|
2010-10-20 10:12:32 -07:00
|
|
|
/**
|
|
|
|
* Starts an offline application cache update.
|
|
|
|
* @param manifestURI
|
|
|
|
* URI of the manifest to fetch, the application cache group ID
|
|
|
|
* @param documentURI
|
|
|
|
* URI of the document that referred the manifest
|
|
|
|
* @param stickDocument
|
|
|
|
* True if the update was initiated by a document load that referred
|
|
|
|
* a manifest.
|
|
|
|
* False if the update was initiated by applicationCache.update() call.
|
|
|
|
*
|
|
|
|
* Tells the update to carry the documentURI to a potential separate
|
|
|
|
* update of implicit (master) items.
|
|
|
|
*
|
|
|
|
* Why this argument? If the document was not found in an offline cache
|
|
|
|
* before load and refers a manifest and this manifest itself has not
|
|
|
|
* been changed since the last fetch, we will not do the application
|
|
|
|
* cache group update. But we must cache the document (identified by the
|
|
|
|
* documentURI). This argument will ensure that a previously uncached
|
|
|
|
* document will get cached and that we don't re-cache a document that
|
|
|
|
* has already been cached (stickDocument=false).
|
|
|
|
*/
|
2012-08-23 12:33:46 -07:00
|
|
|
POfflineCacheUpdate(URIParams manifestURI, URIParams documentURI,
|
2012-07-30 23:36:00 -07:00
|
|
|
bool stickDocument);
|
2010-10-20 10:12:32 -07:00
|
|
|
|
2013-11-19 14:15:59 -08:00
|
|
|
/**
|
|
|
|
* Sets "offline-app" permission for the principal. Called when we hit
|
|
|
|
* a web app with the manifest attribute in <html> and
|
|
|
|
* offline-apps.allow_by_default is set to true.
|
|
|
|
*/
|
|
|
|
SetOfflinePermission(Principal principal);
|
|
|
|
|
2013-09-10 21:18:36 -07:00
|
|
|
sync PIndexedDB(nsCString group, nsCString asciiOrigin)
|
2012-06-01 10:21:12 -07:00
|
|
|
returns (bool allowed);
|
|
|
|
|
2012-06-12 15:01:25 -07: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-08 21:39:02 -07: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 10:20:30 -08:00
|
|
|
ZoomToRect(uint32_t aPresShellId, ViewID aViewId, CSSRect aRect);
|
2012-08-08 21:39:02 -07:00
|
|
|
|
2012-08-21 21:37:06 -07: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.
|
|
|
|
*/
|
2013-11-13 10:20:31 -08:00
|
|
|
ContentReceivedTouch(ScrollableLayerGuid aGuid, bool aPreventDefault);
|
2012-08-21 21:37:06 -07:00
|
|
|
|
2012-09-28 19:18:18 -07:00
|
|
|
/**
|
2013-11-14 09:35:41 -08: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-28 19:18:18 -07:00
|
|
|
*/
|
2013-11-08 16:07:00 -08:00
|
|
|
UpdateZoomConstraints(uint32_t aPresShellId, ViewID aViewId, bool aIsRoot,
|
2014-01-06 10:26:44 -08:00
|
|
|
ZoomConstraints aConstraints);
|
2012-09-28 19:18:18 -07:00
|
|
|
|
2010-08-05 15:11:23 -07:00
|
|
|
__delete__();
|
|
|
|
|
2014-03-18 08:16:47 -07:00
|
|
|
ReplyKeyEvent(WidgetKeyboardEvent event);
|
|
|
|
|
2009-09-09 15:00:14 -07:00
|
|
|
child:
|
2010-08-20 16:24:40 -07: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.
|
|
|
|
*/
|
|
|
|
Show(nsIntSize size);
|
2009-10-28 13:41:46 -07:00
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
LoadURL(nsCString uri);
|
2009-09-09 15:00:14 -07:00
|
|
|
|
2013-02-15 14:27:21 -08:00
|
|
|
CacheFileDescriptor(nsString path, FileDescriptor fd);
|
|
|
|
|
2012-11-21 18:40:57 -08:00
|
|
|
UpdateDimensions(nsRect rect, nsIntSize size, ScreenOrientation orientation) compress;
|
2009-10-29 10:58:31 -07:00
|
|
|
|
2014-03-20 14:34:41 -07:00
|
|
|
UpdateFrame(FrameMetrics frame);
|
2012-08-08 21:39:02 -07:00
|
|
|
|
2014-02-05 14:43:20 -08:00
|
|
|
/**
|
|
|
|
* Acknowledge the receipt of a scroll offset update from the content
|
|
|
|
* process. This is used to manage concurrent scroll updates from many
|
|
|
|
* sources.
|
|
|
|
*/
|
|
|
|
AcknowledgeScrollUpdate(ViewID aScrollId, uint32_t aScrollGeneration);
|
|
|
|
|
2012-08-08 21:39:02 -07:00
|
|
|
/**
|
|
|
|
* Requests handling of a double tap. |point| is in CSS pixels, relative to
|
|
|
|
* the scroll offset. This message is expected to round-trip back to
|
|
|
|
* ZoomToRect() with a rect indicating where we should zoom to.
|
|
|
|
*/
|
2014-03-12 12:27:45 -07:00
|
|
|
HandleDoubleTap(CSSPoint point, ScrollableLayerGuid aGuid);
|
2012-07-19 23:48:27 -07:00
|
|
|
|
2012-09-14 18:16:32 -07:00
|
|
|
/**
|
|
|
|
* Requests handling of a single tap. |point| is in CSS pixels, relative to
|
|
|
|
* the scroll offset. This message is expected to send a "mousedown" and
|
|
|
|
* "mouseup" series of events at this point.
|
|
|
|
*/
|
2014-03-12 12:27:45 -07:00
|
|
|
HandleSingleTap(CSSPoint point, ScrollableLayerGuid aGuid);
|
2012-09-14 18:16:32 -07:00
|
|
|
|
2012-11-08 11:35:02 -08:00
|
|
|
/**
|
|
|
|
* Requests handling of a long tap. |point| is in CSS pixels, relative to
|
|
|
|
* the scroll offset. This message is expected to send a "contextmenu"
|
|
|
|
* events at this point.
|
|
|
|
*/
|
2014-03-12 12:27:45 -07:00
|
|
|
HandleLongTap(CSSPoint point, ScrollableLayerGuid aGuid);
|
2012-11-08 11:35:02 -08:00
|
|
|
|
2013-12-11 16:39:06 -08:00
|
|
|
/**
|
|
|
|
* Requests handling of releasing a long tap. |aPoint| is in CSS pixels,
|
|
|
|
* relative to the current scroll offset. In the case the "contextmenu"
|
|
|
|
* event generated by the preceding HandleLongTap call was not handled,
|
|
|
|
* this message is expected to generate a "mousedown" and "mouseup"
|
|
|
|
* series of events
|
|
|
|
*/
|
2014-03-12 12:27:45 -07:00
|
|
|
HandleLongTapUp(CSSPoint point, ScrollableLayerGuid aGuid);
|
2013-12-11 16:39:06 -08:00
|
|
|
|
2013-12-09 19:14:55 -08:00
|
|
|
/**
|
2014-04-11 17:27:57 -07:00
|
|
|
* Notifies the child about various APZ state changes.
|
|
|
|
* See GeckoContentController::NotifyAPZStateChange() for details.
|
2013-12-09 19:14:55 -08:00
|
|
|
*/
|
2014-04-11 17:27:57 -07:00
|
|
|
NotifyAPZStateChange(ViewID aViewId, APZStateChange aChange, int aArg);
|
2013-12-09 19:14:55 -08:00
|
|
|
|
2009-11-05 10:14:22 -08:00
|
|
|
/**
|
|
|
|
* Sending an activate message moves focus to the child.
|
|
|
|
*/
|
2010-07-19 11:33:33 -07:00
|
|
|
Activate();
|
2010-03-18 23:52:18 -07:00
|
|
|
|
2011-06-17 17:08:32 -07:00
|
|
|
Deactivate();
|
|
|
|
|
2009-11-17 06:22:23 -08:00
|
|
|
/**
|
2010-07-19 11:33:33 -07:00
|
|
|
* @see nsIDOMWindowUtils sendMouseEvent.
|
|
|
|
*/
|
|
|
|
MouseEvent(nsString aType,
|
|
|
|
float aX,
|
|
|
|
float aY,
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t aButton,
|
|
|
|
int32_t aClickCount,
|
|
|
|
int32_t aModifiers,
|
2010-07-19 11:33:33 -07:00
|
|
|
bool aIgnoreRootScrollFrame);
|
|
|
|
|
2013-10-01 23:38:27 -07:00
|
|
|
RealMouseEvent(WidgetMouseEvent event);
|
2014-03-20 08:46:29 -07:00
|
|
|
RealKeyEvent(WidgetKeyboardEvent event, MaybeNativeKeyBinding keyBinding);
|
2013-10-16 02:37:36 -07:00
|
|
|
MouseWheelEvent(WidgetWheelEvent event);
|
2013-11-13 10:20:31 -08:00
|
|
|
RealTouchEvent(WidgetTouchEvent aEvent, ScrollableLayerGuid aGuid);
|
2012-08-22 03:54:20 -07:00
|
|
|
// We use a separate message for touchmove events only to apply
|
|
|
|
// compression to them.
|
2013-11-13 10:20:31 -08:00
|
|
|
RealTouchMoveEvent(WidgetTouchEvent aEvent, ScrollableLayerGuid aGuid) compress;
|
2011-06-21 17:32:43 -07:00
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
/**
|
|
|
|
* @see nsIDOMWindowUtils sendKeyEvent.
|
2009-11-17 06:22:23 -08:00
|
|
|
*/
|
2010-07-19 11:33:33 -07:00
|
|
|
KeyEvent(nsString aType,
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t aKeyCode,
|
|
|
|
int32_t aCharCode,
|
|
|
|
int32_t aModifiers,
|
2010-07-19 11:33:33 -07:00
|
|
|
bool aPreventDefault);
|
2009-11-17 06:22:23 -08:00
|
|
|
|
2013-10-01 00:23:00 -07:00
|
|
|
CompositionEvent(WidgetCompositionEvent event);
|
2010-08-17 01:07:42 -07:00
|
|
|
|
2013-10-01 00:22:59 -07:00
|
|
|
TextEvent(WidgetTextEvent event);
|
2010-08-17 01:07:42 -07:00
|
|
|
|
2013-10-01 00:23:01 -07:00
|
|
|
SelectionEvent(WidgetSelectionEvent event);
|
2010-08-17 01:07:42 -07:00
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
/**
|
|
|
|
* Activate event forwarding from client to parent.
|
|
|
|
*/
|
|
|
|
ActivateFrameEvent(nsString aType, bool capture);
|
2010-02-20 09:05:20 -08:00
|
|
|
|
2013-11-23 21:32:45 -08:00
|
|
|
LoadRemoteScript(nsString aURL, bool aRunInGlobalScope);
|
2010-02-20 09:05:20 -08:00
|
|
|
|
2010-10-26 15:20:53 -07: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-26 15:20:53 -07: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-26 15:20:53 -07:00
|
|
|
* the document. The rendered image will be of size |renderSize|.
|
2010-10-26 15:20:53 -07:00
|
|
|
*/
|
2013-12-26 10:06:53 -08:00
|
|
|
PDocumentRenderer(nsRect documentRect, Matrix transform,
|
2010-10-26 15:20:53 -07:00
|
|
|
nsString bgcolor,
|
2012-08-22 08:56:38 -07:00
|
|
|
uint32_t renderFlags, bool flushLayout,
|
2010-10-26 15:20:53 -07:00
|
|
|
nsIntSize renderSize);
|
2010-03-24 03:47:18 -07:00
|
|
|
|
2010-08-05 15:11:23 -07: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 00:56:57 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Tell the child side if it has to update it's touchable region
|
|
|
|
* to the parent.
|
|
|
|
*/
|
|
|
|
SetUpdateHitRegion(bool aEnabled);
|
|
|
|
|
2014-02-20 03:26:13 -08:00
|
|
|
/**
|
|
|
|
* Tell the child to update its docShell's active state.
|
|
|
|
*/
|
|
|
|
SetIsDocShellActive(bool aIsActive);
|
|
|
|
|
2010-08-05 15:11:23 -07: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-25 16:07:22 -07:00
|
|
|
};
|
|
|
|
|
2009-09-09 15:00:14 -07:00
|
|
|
}
|
2012-07-30 07:58:26 -07:00
|
|
|
}
|