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;
|
2010-07-19 22:33:33 +04:00
|
|
|
include protocol PContent;
|
|
|
|
include protocol PContentDialog;
|
2010-04-27 11:12:38 +04:00
|
|
|
include protocol PDocumentRenderer;
|
2010-09-10 09:00:08 +04:00
|
|
|
include protocol PContentPermissionRequest;
|
2010-08-21 03:24:41 +04:00
|
|
|
include protocol PRenderFrame;
|
2010-10-20 21:12:32 +04:00
|
|
|
include protocol POfflineCacheUpdate;
|
2012-06-01 21:21:12 +04:00
|
|
|
include protocol PIndexedDB;
|
2012-08-23 23:33:46 +04:00
|
|
|
include DOMTypes;
|
|
|
|
include URIParams;
|
2009-09-10 02:00:14 +04:00
|
|
|
|
2010-03-24 13:47:18 +03:00
|
|
|
include "gfxMatrix.h";
|
2012-08-09 08:39:02 +04:00
|
|
|
include "FrameMetrics.h";
|
2010-08-17 12:07:42 +04:00
|
|
|
include "IPC/nsGUIEventIPC.h";
|
2012-07-20 10:48:27 +04:00
|
|
|
include "mozilla/dom/TabMessageUtils.h";
|
2012-11-22 06:40:57 +04:00
|
|
|
include "mozilla/dom/ScreenOrientation.h";
|
2012-07-30 18:58:26 +04:00
|
|
|
include "mozilla/dom/PermissionMessageUtils.h";
|
2012-07-20 10:48:27 +04:00
|
|
|
include "mozilla/layout/RenderFrameUtils.h";
|
2012-08-02 10:02:29 +04:00
|
|
|
|
2012-07-30 18:58:26 +04:00
|
|
|
using IPC::Principal;
|
2012-07-16 06:58:43 +04:00
|
|
|
using gfxMatrix;
|
2012-08-09 08:39:02 +04:00
|
|
|
using gfxRect;
|
2012-07-20 10:48:27 +04:00
|
|
|
using gfxSize;
|
2012-07-18 20:31:40 +04:00
|
|
|
using mozilla::layers::LayersBackend;
|
2012-08-09 08:39:02 +04:00
|
|
|
using mozilla::layers::FrameMetrics;
|
2012-07-20 10:48:27 +04:00
|
|
|
using mozilla::layout::ScrollingBehavior;
|
2013-02-16 02:27:21 +04:00
|
|
|
using mozilla::void_t;
|
2012-07-16 06:58:43 +04:00
|
|
|
using mozilla::WindowsHandle;
|
|
|
|
using nscolor;
|
2010-08-17 12:07:42 +04:00
|
|
|
using nsCompositionEvent;
|
2010-10-27 02:20:53 +04:00
|
|
|
using nsIMEUpdatePreference;
|
2012-07-20 10:48:27 +04:00
|
|
|
using nsIntPoint;
|
|
|
|
using nsIntRect;
|
2010-10-27 02:20:53 +04:00
|
|
|
using nsIntSize;
|
2012-07-16 06:58:43 +04:00
|
|
|
using nsKeyEvent;
|
|
|
|
using nsMouseEvent;
|
|
|
|
using nsMouseScrollEvent;
|
2012-08-12 05:42:34 +04:00
|
|
|
using mozilla::widget::WheelEvent;
|
2010-08-17 12:07:42 +04:00
|
|
|
using nsQueryContentEvent;
|
2010-10-27 02:20:53 +04:00
|
|
|
using nsRect;
|
2010-08-17 12:07:42 +04:00
|
|
|
using nsSelectionEvent;
|
2010-10-27 02:20:53 +04:00
|
|
|
using nsTextEvent;
|
2012-07-16 06:58:43 +04:00
|
|
|
using nsTouchEvent;
|
2010-08-21 03:24:40 +04:00
|
|
|
using RemoteDOMEvent;
|
2012-11-22 06:40:57 +04:00
|
|
|
using mozilla::dom::ScreenOrientation;
|
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
|
|
|
|
2010-07-19 22:33:33 +04:00
|
|
|
rpc protocol PBrowser
|
2009-08-26 03:07:22 +04:00
|
|
|
{
|
2010-07-19 22:33:33 +04:00
|
|
|
manager PContent;
|
|
|
|
|
|
|
|
manages PContentDialog;
|
2009-10-29 20:58:31 +03:00
|
|
|
manages PDocumentRenderer;
|
2010-09-10 09:00:08 +04:00
|
|
|
manages PContentPermissionRequest;
|
2010-08-21 03:24:41 +04:00
|
|
|
manages PRenderFrame;
|
2010-10-20 21:12:32 +04:00
|
|
|
manages POfflineCacheUpdate;
|
2012-06-01 21:21:12 +04:00
|
|
|
manages PIndexedDB;
|
2010-07-19 22:33:33 +04:00
|
|
|
|
|
|
|
both:
|
2012-08-02 10:02:29 +04:00
|
|
|
AsyncMessage(nsString aMessage, ClonedMessageData aData);
|
2009-09-10 02:00:14 +04:00
|
|
|
|
2009-11-05 21:14:22 +03:00
|
|
|
parent:
|
|
|
|
/**
|
|
|
|
* 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
|
|
|
|
2010-07-19 22:33:33 +04:00
|
|
|
rpc CreateWindow() returns (PBrowser window);
|
2010-02-20 20:05:20 +03:00
|
|
|
|
2012-08-02 10:02:29 +04:00
|
|
|
sync SyncMessage(nsString aMessage, ClonedMessageData aData)
|
2010-03-30 00:29:45 +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
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
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
|
|
|
|
*
|
|
|
|
* for insertion, offset == end
|
|
|
|
* for deletion, offset == newEnd
|
|
|
|
*/
|
2012-08-22 19:56:38 +04:00
|
|
|
NotifyIMETextChange(uint32_t offset, uint32_t end, uint32_t newEnd);
|
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
|
|
|
|
*/
|
2012-08-22 19:56:38 +04:00
|
|
|
NotifyIMESelection(uint32_t seqno, uint32_t anchor, uint32_t focus);
|
2010-09-24 07:28:15 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Notifies chrome to refresh its text cache
|
2012-10-25 20:32:24 +04:00
|
|
|
* Only called when NotifyIMEFocus returns PR_TRUE for mWantHints
|
2010-09-24 07:28:15 +04:00
|
|
|
*
|
|
|
|
* text The entire content of the text field
|
|
|
|
*/
|
|
|
|
NotifyIMETextHint(nsString text);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Instructs chrome to end any pending composition
|
|
|
|
*
|
2012-10-25 20:32:24 +04:00
|
|
|
* cancel PR_TRUE if composition should be cancelled
|
2010-09-24 07:28:15 +04:00
|
|
|
* composition Text to commit before ending the composition
|
|
|
|
*
|
2012-10-25 20:32:24 +04:00
|
|
|
* if cancel is PR_TRUE,
|
2010-09-24 07:28:15 +04:00
|
|
|
* widget should return empty string for composition
|
2012-10-25 20:32:24 +04:00
|
|
|
* if cancel is PR_FALSE,
|
2010-09-24 07:28:15 +04:00
|
|
|
* widget should return the current composition text
|
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
sync EndIMEComposition(bool cancel) returns (nsString composition);
|
2010-09-24 07:28:15 +04:00
|
|
|
|
2012-10-27 03:35:20 +04:00
|
|
|
sync GetInputContext() returns (int32_t IMEEnabled, int32_t IMEOpen,
|
2012-10-30 05:58:29 +04:00
|
|
|
intptr_t NativeIMEContext);
|
2010-09-24 07:28:15 +04:00
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
SetInputContext(int32_t IMEEnabled,
|
|
|
|
int32_t IMEOpen,
|
2011-11-27 15:51:52 +04:00
|
|
|
nsString type,
|
2012-08-27 06:16:22 +04:00
|
|
|
nsString inputmode,
|
2011-11-27 15:51:52 +04:00
|
|
|
nsString actionHint,
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t cause,
|
|
|
|
int32_t focusChange);
|
2010-09-24 07:28:15 +04:00
|
|
|
|
2010-12-03 04:24:04 +03:00
|
|
|
/**
|
|
|
|
* Gets the DPI of the screen corresponding to this browser.
|
|
|
|
*/
|
|
|
|
sync GetDPI() returns (float value);
|
|
|
|
|
2011-07-22 04:49:35 +04:00
|
|
|
/**
|
|
|
|
* Return native data of root widget
|
|
|
|
*/
|
|
|
|
sync GetWidgetNativeData() returns (WindowsHandle value);
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
SetCursor(uint32_t value);
|
2011-10-21 02:17:09 +04:00
|
|
|
SetBackgroundColor(nscolor color);
|
2011-06-22 04:32:43 +04:00
|
|
|
|
2012-07-30 18:58:26 +04:00
|
|
|
/**
|
|
|
|
* Initiates an asynchronous request for permission for the
|
|
|
|
* provided principal.
|
|
|
|
*
|
|
|
|
* @param aType
|
|
|
|
* The type of permission to request.
|
2012-11-14 04:06:42 +04:00
|
|
|
* @param aAccess
|
|
|
|
* Access type. "read" for example.
|
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.
|
|
|
|
*/
|
2012-11-14 04:06:42 +04:00
|
|
|
PContentPermissionRequest(nsCString aType, nsCString aAccess, Principal principal);
|
2010-05-13 21:44:51 +04:00
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
PContentDialog(uint32_t aType, nsCString aName, nsCString aFeatures,
|
|
|
|
int32_t[] aIntParams, nsString[] aStringParams);
|
2010-05-17 15:25:22 +04:00
|
|
|
|
2010-08-21 03:24:41 +04:00
|
|
|
/**
|
|
|
|
* Create a layout frame (encapsulating a remote layer tree) for
|
|
|
|
* the page that is currently loaded in the <browser>.
|
|
|
|
*/
|
2012-07-18 03:59:45 +04:00
|
|
|
sync PRenderFrame()
|
2012-07-20 10:48:27 +04:00
|
|
|
returns (ScrollingBehavior scrolling,
|
|
|
|
LayersBackend backend, int32_t maxTextureSize, uint64_t layersId);
|
2010-08-21 03:24:41 +04:00
|
|
|
|
2010-10-20 21:12:32 +04: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 23:33:46 +04:00
|
|
|
POfflineCacheUpdate(URIParams manifestURI, URIParams documentURI,
|
2012-07-31 10:36:00 +04:00
|
|
|
bool stickDocument);
|
2010-10-20 21:12:32 +04:00
|
|
|
|
2012-06-01 21:21:12 +04:00
|
|
|
sync PIndexedDB(nsCString asciiOrigin)
|
|
|
|
returns (bool allowed);
|
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
ZoomToRect(gfxRect aRect);
|
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
ContentReceivedTouch(bool aPreventDefault);
|
|
|
|
|
2012-09-29 06:18:18 +04:00
|
|
|
/**
|
|
|
|
* Updates any zoom constraints on the parent and anything tied to it. This
|
|
|
|
* is useful for control logic that resides outside of the remote browser.
|
|
|
|
*/
|
|
|
|
UpdateZoomConstraints(bool aAllowZoom, float aMinZoom, float aMaxZoom);
|
|
|
|
|
2010-08-06 02:11:23 +04:00
|
|
|
__delete__();
|
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
Show(nsIntSize size);
|
2009-10-28 23:41:46 +03:00
|
|
|
|
2010-07-19 22:33:33 +04:00
|
|
|
LoadURL(nsCString uri);
|
2009-09-10 02:00:14 +04:00
|
|
|
|
2013-02-16 02:27:21 +04:00
|
|
|
CacheFileDescriptor(nsString path, FileDescriptor fd);
|
|
|
|
|
2012-11-22 06:40:57 +04:00
|
|
|
UpdateDimensions(nsRect rect, nsIntSize size, ScreenOrientation orientation) compress;
|
2009-10-29 20:58:31 +03:00
|
|
|
|
2012-09-29 08:02:41 +04:00
|
|
|
UpdateFrame(FrameMetrics frame) compress;
|
2012-08-09 08:39:02 +04: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.
|
|
|
|
*/
|
|
|
|
HandleDoubleTap(nsIntPoint point);
|
2012-07-20 10:48:27 +04:00
|
|
|
|
2012-09-15 05:16:32 +04: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.
|
|
|
|
*/
|
|
|
|
HandleSingleTap(nsIntPoint point);
|
|
|
|
|
2012-11-08 23:35:02 +04: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.
|
|
|
|
*/
|
|
|
|
HandleLongTap(nsIntPoint point);
|
|
|
|
|
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();
|
|
|
|
|
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);
|
|
|
|
|
2011-06-22 04:32:43 +04:00
|
|
|
RealMouseEvent(nsMouseEvent event);
|
|
|
|
RealKeyEvent(nsKeyEvent event);
|
2012-08-12 05:42:34 +04:00
|
|
|
MouseWheelEvent(WheelEvent event);
|
2012-07-16 06:58:43 +04:00
|
|
|
RealTouchEvent(nsTouchEvent event);
|
2012-08-22 14:54:20 +04:00
|
|
|
// We use a separate message for touchmove events only to apply
|
|
|
|
// compression to them.
|
|
|
|
RealTouchMoveEvent(nsTouchEvent event) compress;
|
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
|
|
|
|
2010-08-17 12:07:42 +04:00
|
|
|
CompositionEvent(nsCompositionEvent event);
|
|
|
|
|
|
|
|
TextEvent(nsTextEvent event);
|
|
|
|
|
|
|
|
SelectionEvent(nsSelectionEvent event);
|
|
|
|
|
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
|
|
|
|
2010-07-19 22:33:33 +04:00
|
|
|
LoadRemoteScript(nsString aURL);
|
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
|
|
|
*/
|
2010-10-27 02:20:53 +04:00
|
|
|
PDocumentRenderer(nsRect documentRect, gfxMatrix transform,
|
|
|
|
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
|
|
|
|
2012-12-19 06:37:35 +04:00
|
|
|
/**
|
|
|
|
* Send the child its app type. The app type identifies the kind of app
|
|
|
|
* shown in this PBrowser. Currently, the only recognized app type is
|
|
|
|
* "homescreen".
|
|
|
|
*
|
|
|
|
* The value here corresponds to the "mozapptype" attribute on iframes. For
|
|
|
|
* example, <iframe mozbrowser mozapp="..." mozapptype="homescreen">.
|
|
|
|
*
|
|
|
|
* Only app frames (i.e., frames with an app-id) should have a non-empty app
|
|
|
|
* type. If you try to SetAppType() with a non-empty app type on a non-app
|
|
|
|
* PBrowserChild, we may assert.
|
|
|
|
*/
|
|
|
|
SetAppType(nsString appType);
|
|
|
|
|
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();
|
|
|
|
|
|
|
|
/*
|
|
|
|
* 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
|
|
|
}
|