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
|
|
|
|
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;
|
2015-05-21 20:04:58 +03:00
|
|
|
include protocol PDocAccessible;
|
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;
|
2016-05-16 12:40:54 +03:00
|
|
|
include protocol PRemotePrintJob;
|
2017-04-05 20:02:57 +03:00
|
|
|
include protocol PChildToParentStream;
|
|
|
|
include protocol PParentToChildStream;
|
|
|
|
include protocol PFileDescriptorSet;
|
Bug 1353629 - PBlob refactoring - part 4 - IPCBlobInputStream, r=smaug
IPCBlobInputStream is a new type of nsIInputStream that is used only in content
process when a Blob is sent from parent to child. This inputStream is for now,
just cloneable.
When the parent process sends a Blob to a content process, it has the Blob and
its inputStream. With its inputStream it creates a IPCBlobInputStreamParent
actor. This actor keeps the inputStream alive for following uses (not part of
this patch).
On the child side we will have, of course, a IPCBlobInputStreamChild actor.
This actor is able to create a IPCBlobInputStream when CreateStream() is
called. This means that 1 IPCBlobInputStreamChild can manage multiple
IPCBlobInputStreams each time one of them is cloned. When the last one of this
stream is released, the child actor sends a __delete__ request to the parent
side; the parent will be deleted, and the original inputStream, on the parent
side, will be released as well.
IPCBlobInputStream is a special inputStream because each method, except for
Available() fails. Basically, this inputStream cannot be used on the content
process for nothing else than knowing the size of the original stream.
In the following patches, I'll introduce an async way to use it.
2017-04-24 13:09:40 +03:00
|
|
|
include protocol PIPCBlobInputStream;
|
2017-05-25 20:50:32 +03:00
|
|
|
include protocol PPaymentRequest;
|
Bug 1353629 - PBlob refactoring - part 4 - IPCBlobInputStream, r=smaug
IPCBlobInputStream is a new type of nsIInputStream that is used only in content
process when a Blob is sent from parent to child. This inputStream is for now,
just cloneable.
When the parent process sends a Blob to a content process, it has the Blob and
its inputStream. With its inputStream it creates a IPCBlobInputStreamParent
actor. This actor keeps the inputStream alive for following uses (not part of
this patch).
On the child side we will have, of course, a IPCBlobInputStreamChild actor.
This actor is able to create a IPCBlobInputStream when CreateStream() is
called. This means that 1 IPCBlobInputStreamChild can manage multiple
IPCBlobInputStreams each time one of them is cloned. When the last one of this
stream is released, the child actor sends a __delete__ request to the parent
side; the parent will be deleted, and the original inputStream, on the parent
side, will be released as well.
IPCBlobInputStream is a special inputStream because each method, except for
Available() fails. Basically, this inputStream cannot be used on the content
process for nothing else than knowing the size of the original stream.
In the following patches, I'll introduce an async way to use it.
2017-04-24 13:09:40 +03:00
|
|
|
|
2012-08-23 23:33:46 +04:00
|
|
|
include DOMTypes;
|
2017-04-24 13:09:40 +03:00
|
|
|
include IPCBlob;
|
|
|
|
include IPCStream;
|
2013-07-11 02:05:39 +04:00
|
|
|
include JavaScriptTypes;
|
2012-08-23 23:33:46 +04:00
|
|
|
include URIParams;
|
2016-05-16 12:40:54 +03:00
|
|
|
include PPrintingTypes;
|
2016-04-29 01:04:52 +03:00
|
|
|
include PTabContext;
|
2009-09-10 02:00:14 +04:00
|
|
|
|
2017-06-09 07:32:13 +03:00
|
|
|
include "mozilla/GfxMessageUtils.h";
|
|
|
|
include "mozilla/layers/LayersMessageUtils.h";
|
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";
|
2017-07-05 18:18:48 +03:00
|
|
|
using mozilla::gfx::Matrix from "mozilla/gfx/Matrix.h";
|
2018-04-10 18:53:44 +03:00
|
|
|
using mozilla::gfx::SurfaceFormat from "mozilla/gfx/Types.h";
|
2015-04-07 16:00:05 +03:00
|
|
|
using mozilla::LayoutDeviceIntPoint from "Units.h";
|
2016-09-21 17:26:33 +03:00
|
|
|
using mozilla::LayoutDevicePoint from "Units.h";
|
2015-12-03 08:45:38 +03:00
|
|
|
using mozilla::ScreenIntPoint 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";
|
2018-03-25 02:06:01 +03:00
|
|
|
using mozilla::layers::LayersId from "mozilla/layers/LayersTypes.h";
|
2015-06-17 19:32:41 +03:00
|
|
|
using mozilla::layers::MaybeZoomConstraints from "FrameMetrics.h";
|
2016-09-21 17:26:33 +03:00
|
|
|
using mozilla::layers::GeckoContentController::TapType from "mozilla/layers/GeckoContentController.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";
|
2017-04-11 15:24:55 +03:00
|
|
|
using struct mozilla::widget::IMENotification from "mozilla/widget/IMEData.h";
|
|
|
|
using struct mozilla::widget::IMENotificationRequests from "mozilla/widget/IMEData.h";
|
2018-04-11 19:26:33 +03:00
|
|
|
using mozilla::widget::IMEState::Enabled from "mozilla/widget/IMEData.h";
|
|
|
|
using mozilla::widget::IMEState::Open from "mozilla/widget/IMEData.h";
|
|
|
|
using mozilla::widget::InputContextAction::Cause from "mozilla/widget/IMEData.h";
|
|
|
|
using mozilla::widget::InputContextAction::FocusChange from "mozilla/widget/IMEData.h";
|
2015-03-29 17:59:08 +03:00
|
|
|
using mozilla::gfx::IntSize from "mozilla/gfx/Point.h";
|
2015-04-21 18:04:57 +03:00
|
|
|
using mozilla::gfx::IntPoint from "mozilla/gfx/Point.h";
|
|
|
|
using mozilla::gfx::IntRect from "mozilla/gfx/Rect.h";
|
2015-06-05 12:28:20 +03:00
|
|
|
using class mozilla::ContentCache from "ipc/nsGUIEventIPC.h";
|
2013-10-01 23:25:07 +04:00
|
|
|
using class mozilla::WidgetKeyboardEvent from "ipc/nsGUIEventIPC.h";
|
|
|
|
using class mozilla::WidgetMouseEvent from "ipc/nsGUIEventIPC.h";
|
|
|
|
using class mozilla::WidgetWheelEvent from "ipc/nsGUIEventIPC.h";
|
2015-04-08 21:48:11 +03:00
|
|
|
using class mozilla::WidgetDragEvent from "ipc/nsGUIEventIPC.h";
|
2013-10-01 23:25:07 +04:00
|
|
|
using struct nsRect from "nsRect.h";
|
|
|
|
using class mozilla::WidgetSelectionEvent from "ipc/nsGUIEventIPC.h";
|
|
|
|
using class mozilla::WidgetTouchEvent from "ipc/nsGUIEventIPC.h";
|
2015-12-29 16:57:38 +03:00
|
|
|
using class mozilla::WidgetPluginEvent from "ipc/nsGUIEventIPC.h";
|
2013-10-01 23:25:07 +04:00
|
|
|
using struct mozilla::dom::RemoteDOMEvent from "mozilla/dom/TabMessageUtils.h";
|
|
|
|
using struct mozilla::layers::TextureFactoryIdentifier from "mozilla/layers/CompositorTypes.h";
|
2017-04-10 00:30:27 +03:00
|
|
|
using mozilla::layers::CompositorOptions from "mozilla/layers/CompositorOptions.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-26 10:29:31 +03:00
|
|
|
using mozilla::WritingMode from "mozilla/WritingModes.h";
|
2015-04-14 18:36:36 +03:00
|
|
|
using nsIWidget::TouchPointerState from "nsIWidget.h";
|
2018-04-09 17:48:09 +03:00
|
|
|
using nsCursor from "nsIWidget.h";
|
2015-04-22 17:58:33 +03:00
|
|
|
using struct LookAndFeelInt from "mozilla/widget/WidgetMessageUtils.h";
|
2016-08-10 09:18:29 +03:00
|
|
|
using class mozilla::dom::MessagePort from "mozilla/dom/MessagePort.h";
|
|
|
|
using class mozilla::dom::ipc::StructuredCloneData from "mozilla/dom/ipc/StructuredCloneData.h";
|
2015-08-26 15:56:59 +03:00
|
|
|
using mozilla::EventMessage from "mozilla/EventForwards.h";
|
2015-05-14 15:16:00 +03:00
|
|
|
using nsEventStatus from "mozilla/EventForwards.h";
|
2016-09-21 17:26:33 +03:00
|
|
|
using mozilla::Modifiers from "mozilla/EventForwards.h";
|
2015-08-29 04:12:41 +03:00
|
|
|
using nsSizeMode from "nsIWidgetListener.h";
|
2016-02-02 11:05:56 +03:00
|
|
|
using mozilla::widget::CandidateWindowPosition from "ipc/nsGUIEventIPC.h";
|
Bug 1257759 part.5 PluginInstanceChild should post received native key event to chrome process if the key combination may be a shortcut key r=jimm
When PluginInstanceChild receives native key events, it should post the events to the chrome process first for checking if the key combination is reserved. However, posting all key events to the chrome process may make damage to the performance of text input. Therefore, this patch starts to post a key event whose key combination may be a shortcut key. However, for avoiding to shuffle the event order, it posts following key events until all posted key events are handled by the chrome process.
For receiving response from widget, this patch defines nsIKeyEventInPluginCallback. It's specified by nsIWidget::OnWindowedPluginKeyEvent() for ensuring the caller will receive the reply. Basically, the caller of nsIWidget::OnWindowedPluginKeyEvent() should reply to the child process. However, if the widget is a PuppetWidget, it cannot return the result synchronously. Therefore, PuppetWidget::OnWindowedPluginKeyEvent() returns NS_SUCCESS_EVENT_HANDLED_ASYNCHRONOUSLY and stores the callback to mKeyEventInPluginCallbacks. Then, TabParent::HandledWindowedPluginKeyEvent() will call PuppetWidget::HandledWindowedPluginKeyEvent().
MozReview-Commit-ID: G6brOU26NwQ
--HG--
extra : rebase_source : 8140456de278956d2d594e85c7b397ae366b4962
2016-04-19 14:09:37 +03:00
|
|
|
using class mozilla::NativeEventData from "ipc/nsGUIEventIPC.h";
|
2016-04-26 11:18:04 +03:00
|
|
|
using mozilla::FontRange from "ipc/nsGUIEventIPC.h";
|
2016-12-02 02:28:54 +03:00
|
|
|
using mozilla::a11y::IAccessibleHolder from "mozilla/a11y/IPCTypes.h";
|
2017-06-06 21:22:17 +03:00
|
|
|
using mozilla::OriginAttributes from "mozilla/ipc/BackgroundUtils.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-11-24 22:05:35 +03:00
|
|
|
struct ShowInfo
|
|
|
|
{
|
|
|
|
nsString name;
|
|
|
|
bool fullscreenAllowed;
|
|
|
|
bool isPrivate;
|
2015-10-30 16:24:57 +03:00
|
|
|
bool fakeShowInfo;
|
2016-05-16 05:56:09 +03:00
|
|
|
bool isTransparent;
|
2014-12-12 20:50:46 +03:00
|
|
|
float dpi;
|
2016-09-27 09:37:07 +03:00
|
|
|
int32_t widgetRounding;
|
2014-12-12 20:50:46 +03:00
|
|
|
double defaultScale;
|
2014-11-24 22:05:35 +03:00
|
|
|
};
|
|
|
|
|
2016-06-15 15:49:13 +03:00
|
|
|
union OptionalShmem
|
|
|
|
{
|
|
|
|
void_t;
|
|
|
|
Shmem;
|
|
|
|
};
|
|
|
|
|
2016-10-01 02:20:50 +03:00
|
|
|
nested(upto inside_cpow) 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;
|
2015-05-21 20:04:58 +03:00
|
|
|
manages PDocAccessible;
|
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;
|
2017-05-25 20:50:32 +03:00
|
|
|
manages PPaymentRequest;
|
2010-07-19 22:33:33 +04:00
|
|
|
|
|
|
|
both:
|
2016-04-09 16:50:59 +03:00
|
|
|
async AsyncMessage(nsString aMessage, CpowEntry[] aCpows,
|
|
|
|
Principal aPrincipal, ClonedMessageData aData);
|
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>.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async PRenderFrame();
|
2014-11-16 21:23:22 +03:00
|
|
|
|
2009-11-05 21:14:22 +03:00
|
|
|
parent:
|
2015-05-21 20:04:58 +03:00
|
|
|
/**
|
|
|
|
* Tell the parent process a new accessible document has been created.
|
|
|
|
* aParentDoc is the accessible document it was created in if any, and
|
|
|
|
* aParentAcc is the id of the accessible in that document the new document
|
2016-10-27 22:16:24 +03:00
|
|
|
* is a child of. aMsaaID is the MSAA id for this content process, and
|
2016-12-02 02:28:54 +03:00
|
|
|
* is only valid on Windows. Set to 0 on other platforms. aDocCOMProxy
|
|
|
|
* is also Windows-specific and should be set to 0 on other platforms.
|
2015-05-21 20:04:58 +03:00
|
|
|
*/
|
2016-10-27 22:16:24 +03:00
|
|
|
async PDocAccessible(nullable PDocAccessible aParentDoc, uint64_t aParentAcc,
|
2016-12-02 02:28:54 +03:00
|
|
|
uint32_t aMsaaID, IAccessibleHolder aDocCOMProxy);
|
2015-05-21 20:04:58 +03:00
|
|
|
|
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();
|
|
|
|
|
2017-05-25 20:50:32 +03:00
|
|
|
async PPaymentRequest();
|
|
|
|
|
2015-08-12 18:00:26 +03:00
|
|
|
/**
|
|
|
|
* Sends an NS_NATIVE_CHILD_OF_SHAREABLE_WINDOW to be adopted by the
|
|
|
|
* widget's shareable window on the chrome side. Only used on Windows.
|
|
|
|
*/
|
|
|
|
async SetNativeChildOfShareableWindow(uintptr_t childWindow);
|
|
|
|
|
2015-07-09 17:48:57 +03:00
|
|
|
/**
|
|
|
|
* When content moves focus from a native plugin window that's a child
|
|
|
|
* of the native browser window we need to move native focus to the
|
|
|
|
* browser. Otherwise the plugin window will never relinquish focus.
|
|
|
|
*/
|
|
|
|
sync DispatchFocusToTopLevelWindow();
|
|
|
|
|
2015-01-23 13:10:52 +03:00
|
|
|
parent:
|
2009-11-05 21:14:22 +03:00
|
|
|
/**
|
|
|
|
* When child sends this message, parent should move focus to
|
2015-07-13 13:07:49 +03:00
|
|
|
* the next or previous focusable element or document.
|
2009-11-05 21:14:22 +03:00
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async MoveFocus(bool forward, bool forDocumentNavigation);
|
2009-11-05 21:14:22 +03:00
|
|
|
|
2016-05-11 12:44:57 +03:00
|
|
|
/**
|
|
|
|
* SizeShellTo request propagation to parent.
|
|
|
|
*
|
|
|
|
* aFlag Can indicate if one of the dimensions should be ignored.
|
|
|
|
* If only one dimension has changed it has to be indicated
|
|
|
|
* by the nsIEmbeddingSiteWindow::DIM_FLAGS_IGNORE_* flags.
|
|
|
|
* aShellItemWidth,
|
|
|
|
* aShellItemHeight On parent side we won't be able to decide the dimensions
|
|
|
|
* of the shell item parameter in the original SizeShellTo
|
|
|
|
* call so we send over its dimensions that will be used
|
|
|
|
* for the actual resize.
|
|
|
|
**/
|
|
|
|
async SizeShellTo(uint32_t aFlag, int32_t aWidth, int32_t aHeight,
|
|
|
|
int32_t aShellItemWidth, int32_t aShellItemHeight);
|
|
|
|
|
2015-11-11 01:35:12 +03:00
|
|
|
/**
|
|
|
|
* Called by the child to inform the parent that links are dropped into
|
|
|
|
* content area.
|
|
|
|
*
|
|
|
|
* aLinks A flat array of url, name, and type for each link
|
|
|
|
*/
|
2017-06-07 15:25:46 +03:00
|
|
|
async DropLinks(nsString[] aLinks);
|
2015-11-11 01:35:12 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async Event(RemoteDOMEvent aEvent);
|
2010-01-01 04:35:55 +03:00
|
|
|
|
2013-11-06 21:21:15 +04:00
|
|
|
sync SyncMessage(nsString aMessage, ClonedMessageData aData,
|
|
|
|
CpowEntry[] aCpows, Principal aPrincipal)
|
2015-09-10 23:50:58 +03:00
|
|
|
returns (StructuredCloneData[] retval);
|
2010-03-30 00:29:45 +04:00
|
|
|
|
2016-10-01 02:20:50 +03:00
|
|
|
nested(inside_sync) sync RpcMessage(nsString aMessage, ClonedMessageData aData,
|
|
|
|
CpowEntry[] aCpows, Principal aPrincipal)
|
2015-09-10 23:50:58 +03:00
|
|
|
returns (StructuredCloneData[] retval);
|
2013-10-01 20:15:06 +04:00
|
|
|
|
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.)
|
|
|
|
*
|
2015-06-05 12:28:20 +03:00
|
|
|
* contentCache Cache of content
|
2015-07-17 07:30:01 +03:00
|
|
|
* notification Whole data of the notification
|
2017-04-11 15:24:55 +03:00
|
|
|
* requests Requests of notification for IME of the native widget
|
2010-09-24 07:28:15 +04:00
|
|
|
*/
|
2017-05-08 14:07:56 +03:00
|
|
|
nested(inside_cpow) async NotifyIMEFocus(ContentCache contentCache,
|
|
|
|
IMENotification notification)
|
2017-04-11 15:24:55 +03:00
|
|
|
returns (IMENotificationRequests requests);
|
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
|
|
|
*
|
2015-06-05 12:28:20 +03:00
|
|
|
* contentCache Cache of content
|
2015-07-17 07:30:01 +03:00
|
|
|
* notification Whole data of the notification
|
2010-09-24 07:28:15 +04:00
|
|
|
*/
|
2016-10-01 02:20:50 +03:00
|
|
|
nested(inside_cpow) async NotifyIMETextChange(ContentCache contentCache,
|
|
|
|
IMENotification notification);
|
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
|
|
|
|
*
|
2015-06-05 12:28:20 +03:00
|
|
|
* contentCache Cache of content
|
2013-11-07 04:11:11 +04:00
|
|
|
*/
|
2016-10-01 02:20:50 +03:00
|
|
|
nested(inside_cpow) async NotifyIMECompositionUpdate(ContentCache contentCache,
|
|
|
|
IMENotification notification);
|
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
|
|
|
*
|
2015-06-05 12:28:20 +03:00
|
|
|
* contentCache Cache of content
|
2015-07-17 07:30:01 +03:00
|
|
|
* notification Whole data of the notification
|
2010-09-24 07:28:15 +04:00
|
|
|
*/
|
2016-10-01 02:20:50 +03:00
|
|
|
nested(inside_cpow) async NotifyIMESelection(ContentCache contentCache,
|
|
|
|
IMENotification notification);
|
2010-09-24 07:28:15 +04:00
|
|
|
|
|
|
|
/**
|
2015-06-05 12:28:20 +03:00
|
|
|
* Notifies chrome of updating its content cache.
|
|
|
|
* This is useful if content is modified but we don't need to notify IME.
|
2010-09-24 07:28:15 +04:00
|
|
|
*
|
2015-06-05 12:28:20 +03:00
|
|
|
* contentCache Cache of content
|
2010-09-24 07:28:15 +04:00
|
|
|
*/
|
2016-10-01 02:20:50 +03:00
|
|
|
nested(inside_cpow) async UpdateContentCache(ContentCache contentCache);
|
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.
|
|
|
|
*
|
2017-05-08 14:07:56 +03:00
|
|
|
* Returns true if the mouse button event is consumed by IME.
|
2014-09-11 17:46:17 +04:00
|
|
|
*/
|
2016-10-01 02:20:50 +03:00
|
|
|
nested(inside_cpow) sync NotifyIMEMouseButtonEvent(IMENotification notification)
|
2014-09-11 17:46:17 +04:00
|
|
|
returns (bool consumedByIME);
|
|
|
|
|
2014-12-15 12:37:00 +03:00
|
|
|
/**
|
|
|
|
* Notifies chrome to position change
|
|
|
|
*
|
2015-06-05 12:28:20 +03:00
|
|
|
* contentCache Cache of content
|
2014-12-15 12:37:00 +03:00
|
|
|
*/
|
2016-10-01 02:20:50 +03:00
|
|
|
nested(inside_cpow) async NotifyIMEPositionChange(ContentCache contentCache,
|
|
|
|
IMENotification notification);
|
2014-12-15 12:37:00 +03:00
|
|
|
|
2010-09-24 07:28:15 +04:00
|
|
|
/**
|
2015-12-11 09:15:58 +03:00
|
|
|
* Requests chrome to commit or cancel composition of IME.
|
2010-09-24 07:28:15 +04:00
|
|
|
*
|
2015-12-11 09:15:58 +03:00
|
|
|
* cancel Set true if composition should be cancelled.
|
2010-09-24 07:28:15 +04:00
|
|
|
*
|
2015-12-11 09:15:58 +03:00
|
|
|
* isCommitted Returns true if the request causes composition
|
|
|
|
* being committed synchronously.
|
|
|
|
* committedString Returns committed string. The may be non-empty
|
|
|
|
* string even if cancel is true because IME may
|
|
|
|
* try to restore selected string which was
|
|
|
|
* replaced with the composition.
|
2010-09-24 07:28:15 +04:00
|
|
|
*/
|
2016-10-01 02:20:50 +03:00
|
|
|
nested(inside_cpow) sync RequestIMEToCommitComposition(bool cancel)
|
2015-12-11 09:15:58 +03:00
|
|
|
returns (bool isCommitted, nsString committedString);
|
2010-09-24 07:28:15 +04:00
|
|
|
|
2015-07-11 04:53:55 +03:00
|
|
|
/**
|
2015-07-22 08:51:36 +03:00
|
|
|
* OnEventNeedingAckHandled() is called after a child process dispatches a
|
2015-07-11 04:53:55 +03:00
|
|
|
* composition event or a selection event which is sent from the parent
|
|
|
|
* process.
|
2015-07-11 04:53:56 +03:00
|
|
|
*
|
2015-07-22 08:51:36 +03:00
|
|
|
* message The message value of the handled event.
|
2015-07-11 04:53:55 +03:00
|
|
|
*/
|
2016-10-01 02:20:50 +03:00
|
|
|
nested(inside_cpow) async OnEventNeedingAckHandled(EventMessage message);
|
2015-07-11 04:53:55 +03: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
|
|
|
|
*/
|
2016-10-01 02:20:50 +03:00
|
|
|
nested(inside_cpow) sync StartPluginIME(WidgetKeyboardEvent aKeyboardEvent,
|
|
|
|
int32_t panelX, int32_t panelY)
|
|
|
|
returns (nsString aCommitted);
|
2015-02-20 19:37:02 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|
|
|
|
*/
|
2016-10-01 02:20:50 +03:00
|
|
|
nested(inside_cpow) async SetPluginFocused(bool aFocused);
|
2015-02-20 19:37:02 +03:00
|
|
|
|
2015-12-29 16:57:38 +03:00
|
|
|
/**
|
|
|
|
* Set IME candidate window by windowless plugin if plugin has focus.
|
|
|
|
*/
|
2016-02-02 11:05:56 +03:00
|
|
|
async SetCandidateWindowForPlugin(CandidateWindowPosition aPosition);
|
2015-12-29 16:57:38 +03:00
|
|
|
|
Bug 1257759 part.5 PluginInstanceChild should post received native key event to chrome process if the key combination may be a shortcut key r=jimm
When PluginInstanceChild receives native key events, it should post the events to the chrome process first for checking if the key combination is reserved. However, posting all key events to the chrome process may make damage to the performance of text input. Therefore, this patch starts to post a key event whose key combination may be a shortcut key. However, for avoiding to shuffle the event order, it posts following key events until all posted key events are handled by the chrome process.
For receiving response from widget, this patch defines nsIKeyEventInPluginCallback. It's specified by nsIWidget::OnWindowedPluginKeyEvent() for ensuring the caller will receive the reply. Basically, the caller of nsIWidget::OnWindowedPluginKeyEvent() should reply to the child process. However, if the widget is a PuppetWidget, it cannot return the result synchronously. Therefore, PuppetWidget::OnWindowedPluginKeyEvent() returns NS_SUCCESS_EVENT_HANDLED_ASYNCHRONOUSLY and stores the callback to mKeyEventInPluginCallbacks. Then, TabParent::HandledWindowedPluginKeyEvent() will call PuppetWidget::HandledWindowedPluginKeyEvent().
MozReview-Commit-ID: G6brOU26NwQ
--HG--
extra : rebase_source : 8140456de278956d2d594e85c7b397ae366b4962
2016-04-19 14:09:37 +03:00
|
|
|
/**
|
|
|
|
* Notifies the parent process of native key event data received in a
|
|
|
|
* plugin process directly.
|
|
|
|
*
|
|
|
|
* aKeyEventData The native key event data. The actual type copied into
|
|
|
|
* NativeEventData depending on the caller. Please check
|
|
|
|
* PluginInstanceChild.
|
|
|
|
*/
|
2016-10-01 02:20:50 +03:00
|
|
|
nested(inside_cpow) async OnWindowedPluginKeyEvent(NativeEventData aKeyEventData);
|
Bug 1257759 part.5 PluginInstanceChild should post received native key event to chrome process if the key combination may be a shortcut key r=jimm
When PluginInstanceChild receives native key events, it should post the events to the chrome process first for checking if the key combination is reserved. However, posting all key events to the chrome process may make damage to the performance of text input. Therefore, this patch starts to post a key event whose key combination may be a shortcut key. However, for avoiding to shuffle the event order, it posts following key events until all posted key events are handled by the chrome process.
For receiving response from widget, this patch defines nsIKeyEventInPluginCallback. It's specified by nsIWidget::OnWindowedPluginKeyEvent() for ensuring the caller will receive the reply. Basically, the caller of nsIWidget::OnWindowedPluginKeyEvent() should reply to the child process. However, if the widget is a PuppetWidget, it cannot return the result synchronously. Therefore, PuppetWidget::OnWindowedPluginKeyEvent() returns NS_SUCCESS_EVENT_HANDLED_ASYNCHRONOUSLY and stores the callback to mKeyEventInPluginCallbacks. Then, TabParent::HandledWindowedPluginKeyEvent() will call PuppetWidget::HandledWindowedPluginKeyEvent().
MozReview-Commit-ID: G6brOU26NwQ
--HG--
extra : rebase_source : 8140456de278956d2d594e85c7b397ae366b4962
2016-04-19 14:09:37 +03:00
|
|
|
|
2015-12-29 16:57:38 +03:00
|
|
|
/**
|
|
|
|
* When plugin event isn't consumed, call this
|
|
|
|
*/
|
|
|
|
async DefaultProcOfPluginEvent(WidgetPluginEvent aEvent);
|
|
|
|
|
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.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async RequestFocus(bool canRaise);
|
2013-09-21 02:07:51 +04:00
|
|
|
|
2014-12-09 18:48:27 +03:00
|
|
|
/**
|
|
|
|
* Indicate, based on the current state, that some commands are enabled and
|
|
|
|
* some are disabled.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async EnableDisableCommands(nsString action,
|
|
|
|
nsCString[] enabledCommands,
|
|
|
|
nsCString[] disabledCommands);
|
2014-12-09 18:48:27 +03:00
|
|
|
|
2018-04-11 19:26:33 +03:00
|
|
|
nested(inside_cpow) sync GetInputContext() returns (Enabled IMEEnabled,
|
|
|
|
Open IMEOpen);
|
2014-10-31 01:51:39 +03:00
|
|
|
|
2018-04-11 19:26:33 +03:00
|
|
|
nested(inside_cpow) async SetInputContext(Enabled IMEEnabled,
|
|
|
|
Open IMEOpen,
|
2016-10-01 02:20:50 +03:00
|
|
|
nsString type,
|
|
|
|
nsString inputmode,
|
|
|
|
nsString actionHint,
|
2017-07-30 20:45:03 +03:00
|
|
|
bool inPrivateBrowsing,
|
2018-04-11 19:26:33 +03:00
|
|
|
Cause cause,
|
|
|
|
FocusChange focusChange);
|
2010-09-24 07:28:15 +04:00
|
|
|
|
2014-04-05 01:50:42 +04:00
|
|
|
sync IsParentWindowMainWidgetVisible() returns (bool visible);
|
|
|
|
|
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.
|
|
|
|
*/
|
2018-04-09 17:48:09 +03:00
|
|
|
async SetCursor(nsCursor value, bool force);
|
2014-05-28 05:12:29 +04:00
|
|
|
|
2015-05-20 04:28:57 +03:00
|
|
|
/**
|
|
|
|
* Set the native cursor using a custom image.
|
|
|
|
* @param cursorData
|
|
|
|
* Serialized image data.
|
|
|
|
* @param width
|
|
|
|
* Width of the image.
|
|
|
|
* @param height
|
|
|
|
* Height of the image.
|
|
|
|
* @param stride
|
|
|
|
* Stride used in the image data.
|
|
|
|
* @param format
|
|
|
|
* Image format, see gfx::SurfaceFormat for possible values.
|
|
|
|
* @param hotspotX
|
|
|
|
* Horizontal hotspot of the image, as specified by the css cursor property.
|
|
|
|
* @param hotspotY
|
|
|
|
* Vertical hotspot of the image, as specified by the css cursor property.
|
|
|
|
* @param force
|
|
|
|
* Invalidate any locally cached cursor settings and force an
|
|
|
|
* update.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async SetCustomCursor(nsCString cursorData, uint32_t width, uint32_t height,
|
2018-04-10 18:53:44 +03:00
|
|
|
uint32_t stride, SurfaceFormat format,
|
2016-01-27 00:51:53 +03:00
|
|
|
uint32_t hotspotX, uint32_t hotspotY, bool force);
|
2015-05-20 04:28:57 +03: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.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async SetStatus(uint32_t type, nsString status);
|
2013-07-25 23:45:31 +04:00
|
|
|
|
2014-01-23 00:27:23 +04:00
|
|
|
/**
|
|
|
|
* Show/hide a tooltip when the mouse hovers over an element in the content
|
|
|
|
* document.
|
|
|
|
*/
|
2016-04-12 23:47:25 +03:00
|
|
|
async ShowTooltip(uint32_t x, uint32_t y, nsString tooltip, nsString direction);
|
2016-01-27 00:51:53 +03:00
|
|
|
async HideTooltip();
|
2014-01-23 00:27:23 +04:00
|
|
|
|
2014-02-24 00:19:43 +04:00
|
|
|
/**
|
|
|
|
* Create an asynchronous color picker on the parent side,
|
|
|
|
* but don't open it yet.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async PColorPicker(nsString title, nsString initialColor);
|
2014-02-24 00:19:43 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PFilePicker(nsString aTitle, int16_t aMode);
|
2014-02-18 04:30:06 +04:00
|
|
|
|
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.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async PIndexedDBPermissionRequest(Principal principal);
|
2014-09-27 03:21:57 +04:00
|
|
|
|
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.
|
|
|
|
*/
|
2017-06-15 20:28:11 +03:00
|
|
|
async BrowserFrameOpenWindow(PBrowser opener, PRenderFrame renderFrame,
|
|
|
|
nsString aURL, nsString aName, nsString aFeatures)
|
|
|
|
returns (CreatedWindowInfo window);
|
2012-06-13 02:01:25 +04:00
|
|
|
|
2015-08-28 08:10:48 +03:00
|
|
|
/**
|
|
|
|
* Tells the containing widget whether the given input block results in a
|
|
|
|
* swipe. Should be called in response to a WidgetWheelEvent that has
|
|
|
|
* mFlags.mCanTriggerSwipe set on it.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async RespondStartSwipeEvent(uint64_t aInputBlockId, bool aStartSwipe);
|
2015-08-28 08:10:48 +03: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.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async AsyncAuthPrompt(nsCString uri, nsString realm, uint64_t aCallbackId);
|
2014-06-11 09:44:36 +04:00
|
|
|
|
2016-04-26 11:18:04 +03:00
|
|
|
/**
|
|
|
|
* Look up dictionary by selected word for OSX
|
|
|
|
*
|
|
|
|
* @param aText The word to look up
|
|
|
|
* @param aFontRange Text decoration of aText
|
|
|
|
* @param aIsVertical true if vertical layout
|
|
|
|
*/
|
|
|
|
async LookUpDictionary(nsString aText, FontRange[] aFontRangeArray,
|
|
|
|
bool aIsVertical, LayoutDeviceIntPoint aPoint);
|
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async __delete__();
|
2010-08-06 02:11:23 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async ReplyKeyEvent(WidgetKeyboardEvent event);
|
2014-03-18 19:16:47 +04:00
|
|
|
|
2017-05-19 12:46:02 +03:00
|
|
|
/**
|
|
|
|
* Retrieves edit commands for the key combination represented by aEvent.
|
|
|
|
*
|
|
|
|
* @param aType One of nsIWidget::NativeKeyBindingsType.
|
|
|
|
* @param aEvent KeyboardEvent which represents a key combination.
|
|
|
|
* Note that this must be a trusted event.
|
|
|
|
* @return Array of edit commands which should be executed in
|
|
|
|
* editor of native applications.
|
|
|
|
*/
|
|
|
|
sync RequestNativeKeyBindings(uint32_t aType, WidgetKeyboardEvent aEvent)
|
|
|
|
returns (CommandInt[] commands);
|
2014-04-22 00:40:09 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async SynthesizeNativeKeyEvent(int32_t aNativeKeyboardLayout,
|
|
|
|
int32_t aNativeKeyCode,
|
|
|
|
uint32_t aModifierFlags,
|
|
|
|
nsString aCharacters,
|
|
|
|
nsString aUnmodifiedCharacters,
|
|
|
|
uint64_t aObserverId);
|
|
|
|
async SynthesizeNativeMouseEvent(LayoutDeviceIntPoint aPoint,
|
2015-04-14 18:36:36 +03:00
|
|
|
uint32_t aNativeMessage,
|
|
|
|
uint32_t aModifierFlags,
|
|
|
|
uint64_t aObserverId);
|
2016-01-27 00:51:53 +03:00
|
|
|
async SynthesizeNativeMouseMove(LayoutDeviceIntPoint aPoint,
|
|
|
|
uint64_t aObserverId);
|
|
|
|
async SynthesizeNativeMouseScrollEvent(LayoutDeviceIntPoint aPoint,
|
|
|
|
uint32_t aNativeMessage,
|
|
|
|
double aDeltaX,
|
|
|
|
double aDeltaY,
|
|
|
|
double aDeltaZ,
|
|
|
|
uint32_t aModifierFlags,
|
|
|
|
uint32_t aAdditionalFlags,
|
|
|
|
uint64_t aObserverId);
|
|
|
|
async SynthesizeNativeTouchPoint(uint32_t aPointerId,
|
|
|
|
TouchPointerState aPointerState,
|
2016-04-15 13:39:36 +03:00
|
|
|
LayoutDeviceIntPoint aPoint,
|
2016-01-27 00:51:53 +03:00
|
|
|
double aPointerPressure,
|
|
|
|
uint32_t aPointerOrientation,
|
|
|
|
uint64_t aObserverId);
|
2016-04-15 13:39:36 +03:00
|
|
|
async SynthesizeNativeTouchTap(LayoutDeviceIntPoint aPoint,
|
2016-01-27 00:51:53 +03:00
|
|
|
bool aLongTap,
|
|
|
|
uint64_t aObserverId);
|
|
|
|
async ClearNativeTouchSequence(uint64_t aObserverId);
|
2016-04-14 21:03:00 +03:00
|
|
|
|
2016-04-25 16:33:00 +03:00
|
|
|
/**
|
|
|
|
* Returns the number of tabs in the window via the out parameter.
|
|
|
|
* If the number of tabs can't be determined, returns 0.
|
|
|
|
*
|
|
|
|
* @param aValue where to store the tab count
|
|
|
|
*/
|
2016-04-14 21:03:00 +03:00
|
|
|
sync GetTabCount() returns (uint32_t value);
|
2016-04-25 16:33:00 +03:00
|
|
|
|
2016-05-11 15:56:42 +03:00
|
|
|
async AccessKeyNotHandled(WidgetKeyboardEvent event);
|
|
|
|
|
2017-04-14 00:54:07 +03:00
|
|
|
async SetHasBeforeUnload(bool aHasBeforeUnload);
|
|
|
|
|
2015-04-14 18:36:36 +03:00
|
|
|
child:
|
2016-01-27 00:51:53 +03:00
|
|
|
async NativeSynthesisResponse(uint64_t aObserverId, nsCString aResponse);
|
2015-04-14 18:36:36 +03:00
|
|
|
|
|
|
|
parent:
|
|
|
|
|
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();
|
|
|
|
|
2017-03-21 10:44:12 +03:00
|
|
|
/**
|
|
|
|
* Child informs the parent that the content is ready to handle input
|
|
|
|
* events. This is sent when the TabChild is created.
|
|
|
|
*/
|
|
|
|
async RemoteIsReadyToHandleInputEvents();
|
|
|
|
|
2016-07-23 02:36:45 +03:00
|
|
|
/**
|
|
|
|
* Child informs the parent that the layer tree is already available.
|
|
|
|
*/
|
|
|
|
async ForcePaintNoOp(uint64_t aLayerObserverEpoch);
|
|
|
|
|
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);
|
|
|
|
|
2016-10-01 02:20:50 +03:00
|
|
|
nested(inside_sync) sync DispatchWheelEvent(WidgetWheelEvent event);
|
|
|
|
nested(inside_sync) sync DispatchMouseEvent(WidgetMouseEvent event);
|
|
|
|
nested(inside_sync) sync DispatchKeyboardEvent(WidgetKeyboardEvent event);
|
2015-03-07 01:26:59 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async InvokeDragSession(IPCDataTransfer[] transfers, uint32_t action,
|
2016-06-15 15:49:13 +03:00
|
|
|
OptionalShmem visualData,
|
2018-04-10 18:53:44 +03:00
|
|
|
uint32_t stride, SurfaceFormat format,
|
2018-02-09 04:43:53 +03:00
|
|
|
LayoutDeviceIntRect dragRect,
|
|
|
|
nsCString principalURISpec);
|
2015-07-10 19:38:44 +03:00
|
|
|
|
2016-09-20 11:19:32 +03:00
|
|
|
// After a compositor reset, it is necessary to reconnect each layers ID to
|
|
|
|
// the compositor of the widget that will render those layers. Note that
|
|
|
|
// this is sync so we can ensure that messages to the window compositor
|
|
|
|
// arrive before the TabChild attempts to use its cross-process compositor
|
|
|
|
// bridge.
|
2017-04-10 00:31:24 +03:00
|
|
|
sync EnsureLayersConnected() returns (CompositorOptions compositorOptions);
|
2016-09-20 11:19:32 +03:00
|
|
|
|
2017-08-22 09:23:41 +03:00
|
|
|
/**
|
|
|
|
* This function is used to notify the parent that it should display a
|
|
|
|
* canvas permission prompt.
|
|
|
|
*
|
|
|
|
* @param aFirstPartyURI first party of the tab that is requesting access.
|
|
|
|
*/
|
|
|
|
async ShowCanvasPermissionPrompt(nsCString aFirstPartyURI);
|
|
|
|
|
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.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async Show(ScreenIntSize size,
|
|
|
|
ShowInfo info,
|
2016-02-23 19:10:00 +03:00
|
|
|
bool parentIsActive,
|
|
|
|
nsSizeMode sizeMode);
|
2009-10-28 23:41:46 +03:00
|
|
|
|
2017-01-17 23:52:45 +03:00
|
|
|
async InitRendering(TextureFactoryIdentifier textureFactoryIdentifier,
|
2018-03-25 02:06:01 +03:00
|
|
|
LayersId layersId,
|
2017-04-10 00:30:27 +03:00
|
|
|
CompositorOptions compositorOptions,
|
2017-03-31 18:43:21 +03:00
|
|
|
bool layersConnected,
|
2017-01-17 23:52:45 +03:00
|
|
|
nullable PRenderFrame renderFrame);
|
|
|
|
|
2016-07-11 01:28:13 +03:00
|
|
|
async LoadURL(nsCString uri, ShowInfo info);
|
2009-09-10 02:00:14 +04:00
|
|
|
|
2017-06-07 21:36:46 +03:00
|
|
|
async UpdateDimensions(DimensionInfo dimensions) compressall;
|
2009-10-29 20:58:31 +03:00
|
|
|
|
2016-02-23 19:10:00 +03:00
|
|
|
async SizeModeChanged(nsSizeMode sizeMode);
|
|
|
|
|
2017-08-23 12:02:57 +03:00
|
|
|
async ParentActivated(bool aActivated);
|
|
|
|
|
2016-06-09 14:59:31 +03:00
|
|
|
async SetKeyboardIndicators(UIStateChangeType showAccelerators,
|
|
|
|
UIStateChangeType showFocusRings);
|
|
|
|
|
2015-07-01 16:19:11 +03:00
|
|
|
/**
|
|
|
|
* StopIMEStateManagement() is called when the process loses focus and
|
|
|
|
* should stop managing IME state.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async StopIMEStateManagement();
|
2015-07-01 16:19:11 +03:00
|
|
|
|
2009-11-17 17:22:23 +03:00
|
|
|
/**
|
2010-07-19 22:33:33 +04:00
|
|
|
* @see nsIDOMWindowUtils sendMouseEvent.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async MouseEvent(nsString aType,
|
|
|
|
float aX,
|
|
|
|
float aY,
|
|
|
|
int32_t aButton,
|
|
|
|
int32_t aClickCount,
|
|
|
|
int32_t aModifiers,
|
|
|
|
bool aIgnoreRootScrollFrame);
|
2010-07-19 22:33:33 +04:00
|
|
|
|
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.
|
|
|
|
*/
|
2017-03-21 10:44:12 +03:00
|
|
|
prio(input) async RealMouseMoveEvent(WidgetMouseEvent event,
|
|
|
|
ScrollableLayerGuid aGuid,
|
|
|
|
uint64_t aInputBlockId) compress;
|
2017-07-28 10:14:54 +03:00
|
|
|
|
|
|
|
async NormalPriorityRealMouseMoveEvent(WidgetMouseEvent event,
|
|
|
|
ScrollableLayerGuid aGuid,
|
|
|
|
uint64_t aInputBlockId) compress;
|
|
|
|
|
2015-07-28 01:35:51 +03:00
|
|
|
/**
|
|
|
|
* Mouse move events with |reason == eSynthesized| are sent via a separate
|
|
|
|
* message because they do not generate DOM 'mousemove' events, and the
|
|
|
|
* 'compress' attribute on RealMouseMoveEvent() could result in a
|
|
|
|
* |reason == eReal| event being dropped in favour of an |eSynthesized|
|
|
|
|
* event, and thus a DOM 'mousemove' event to be lost.
|
|
|
|
*/
|
2017-03-21 10:44:12 +03:00
|
|
|
prio(input) async SynthMouseMoveEvent(WidgetMouseEvent event,
|
|
|
|
ScrollableLayerGuid aGuid,
|
|
|
|
uint64_t aInputBlockId);
|
2017-07-28 10:14:54 +03:00
|
|
|
async NormalPrioritySynthMouseMoveEvent(WidgetMouseEvent event,
|
|
|
|
ScrollableLayerGuid aGuid,
|
|
|
|
uint64_t aInputBlockId);
|
|
|
|
|
2017-03-21 10:44:12 +03:00
|
|
|
prio(input) async RealMouseButtonEvent(WidgetMouseEvent event,
|
|
|
|
ScrollableLayerGuid aGuid,
|
|
|
|
uint64_t aInputBlockId);
|
2017-07-28 10:14:54 +03:00
|
|
|
async NormalPriorityRealMouseButtonEvent(WidgetMouseEvent event,
|
|
|
|
ScrollableLayerGuid aGuid,
|
|
|
|
uint64_t aInputBlockId);
|
|
|
|
|
2017-03-21 10:44:12 +03:00
|
|
|
prio(input) async RealKeyEvent(WidgetKeyboardEvent event);
|
2017-07-28 10:14:54 +03:00
|
|
|
async NormalPriorityRealKeyEvent(WidgetKeyboardEvent event);
|
|
|
|
|
2017-03-21 10:44:12 +03:00
|
|
|
prio(input) async MouseWheelEvent(WidgetWheelEvent event,
|
|
|
|
ScrollableLayerGuid aGuid,
|
|
|
|
uint64_t aInputBlockId);
|
2017-07-28 10:14:54 +03:00
|
|
|
async NormalPriorityMouseWheelEvent(WidgetWheelEvent event,
|
|
|
|
ScrollableLayerGuid aGuid,
|
|
|
|
uint64_t aInputBlockId);
|
|
|
|
|
2017-03-21 10:44:12 +03:00
|
|
|
prio(input) async RealTouchEvent(WidgetTouchEvent aEvent,
|
|
|
|
ScrollableLayerGuid aGuid,
|
|
|
|
uint64_t aInputBlockId,
|
|
|
|
nsEventStatus aApzResponse);
|
2017-07-28 10:14:54 +03:00
|
|
|
async NormalPriorityRealTouchEvent(WidgetTouchEvent aEvent,
|
|
|
|
ScrollableLayerGuid aGuid,
|
|
|
|
uint64_t aInputBlockId,
|
|
|
|
nsEventStatus aApzResponse);
|
|
|
|
|
2017-03-21 10:44:12 +03:00
|
|
|
prio(input) async HandleTap(TapType aType, LayoutDevicePoint point,
|
|
|
|
Modifiers aModifiers, ScrollableLayerGuid aGuid,
|
|
|
|
uint64_t aInputBlockId);
|
2017-07-28 10:14:54 +03:00
|
|
|
async NormalPriorityHandleTap(TapType aType, LayoutDevicePoint point,
|
|
|
|
Modifiers aModifiers, ScrollableLayerGuid aGuid,
|
|
|
|
uint64_t aInputBlockId);
|
|
|
|
|
2017-03-21 10:44:12 +03:00
|
|
|
prio(input) async RealTouchMoveEvent(WidgetTouchEvent aEvent,
|
|
|
|
ScrollableLayerGuid aGuid,
|
|
|
|
uint64_t aInputBlockId,
|
|
|
|
nsEventStatus aApzResponse);
|
2017-07-28 10:14:54 +03:00
|
|
|
async NormalPriorityRealTouchMoveEvent(WidgetTouchEvent aEvent,
|
|
|
|
ScrollableLayerGuid aGuid,
|
|
|
|
uint64_t aInputBlockId,
|
|
|
|
nsEventStatus aApzResponse);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* We disable the input event queue when there is an active dnd session. We
|
|
|
|
* don't need support RealDragEvent with input priority.
|
|
|
|
*/
|
|
|
|
async RealDragEvent(WidgetDragEvent aEvent, uint32_t aDragAction,
|
2018-02-09 04:43:53 +03:00
|
|
|
uint32_t aDropEffect, nsCString aPrincipalURISpec);
|
2017-07-28 10:14:54 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PluginEvent(WidgetPluginEvent aEvent);
|
2011-06-22 04:32:43 +04:00
|
|
|
|
2017-09-29 16:03:25 +03:00
|
|
|
prio(input) async CompositionEvent(WidgetCompositionEvent event);
|
|
|
|
async NormalPriorityCompositionEvent(WidgetCompositionEvent event);
|
2010-08-17 12:07:42 +04:00
|
|
|
|
2017-09-29 16:03:25 +03:00
|
|
|
prio(input) async SelectionEvent(WidgetSelectionEvent event);
|
|
|
|
async NormalPrioritySelectionEvent(WidgetSelectionEvent event);
|
2010-08-17 12:07:42 +04:00
|
|
|
|
2016-08-31 04:30:45 +03:00
|
|
|
/**
|
|
|
|
* Call PasteTransferable via a controller on the content process
|
|
|
|
* to handle the command content event, "pasteTransferable".
|
|
|
|
*/
|
|
|
|
async PasteTransferable(IPCDataTransfer aDataTransfer,
|
|
|
|
bool aIsPrivateData,
|
2018-03-14 11:44:36 +03:00
|
|
|
Principal aRequestingPrincipal,
|
|
|
|
uint32_t aContentPolicyType);
|
2016-08-31 04:30:45 +03:00
|
|
|
|
2010-07-19 22:33:33 +04:00
|
|
|
/**
|
|
|
|
* Activate event forwarding from client to parent.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async ActivateFrameEvent(nsString aType, bool capture);
|
2010-02-20 20:05:20 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async LoadRemoteScript(nsString aURL, bool aRunInGlobalScope);
|
2010-02-20 20:05:20 +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.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async Destroy();
|
2010-08-06 02:11:23 +04:00
|
|
|
|
2014-02-20 15:26:13 +04:00
|
|
|
/**
|
2015-09-04 16:42:01 +03:00
|
|
|
* Update the child side docShell active (resource use) state.
|
2016-07-23 02:36:45 +03:00
|
|
|
*
|
|
|
|
* @param aIsActive
|
|
|
|
* Whether to activate or deactivate the docshell.
|
|
|
|
* @param aPreserveLayers
|
|
|
|
* Whether layer trees should be preserved for inactive docshells.
|
2017-11-03 17:27:05 +03:00
|
|
|
*/
|
|
|
|
async SetDocShellIsActive(bool aIsActive);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* If aEnabled is true, tells the child to paint and upload layers to
|
|
|
|
* the compositor. If aEnabled is false, the child stops painting and
|
|
|
|
* clears the layers from the compositor.
|
|
|
|
*
|
|
|
|
* @param aEnabled
|
|
|
|
* True if the child should render and upload layers, false if the
|
|
|
|
* child should clear layers.
|
2016-07-23 02:36:45 +03:00
|
|
|
* @param aLayerObserverEpoch
|
|
|
|
* The layer observer epoch for this activation. This message should be
|
|
|
|
* ignored if this epoch has already been observed (via ForcePaint).
|
|
|
|
*/
|
2017-11-03 17:27:05 +03:00
|
|
|
async RenderLayers(bool aEnabled, uint64_t aLayerObserverEpoch);
|
2014-02-20 15:26:13 +04:00
|
|
|
|
2015-08-20 00:08:41 +03:00
|
|
|
/**
|
|
|
|
* Notify the child that it shouldn't paint the offscreen displayport.
|
|
|
|
* This is useful to speed up interactive operations over async
|
|
|
|
* scrolling performance like resize, tabswitch, pageload.
|
|
|
|
*
|
|
|
|
* Each enable call must be matched with a disable call. The child
|
|
|
|
* will remain in the suppress mode as long as there's
|
|
|
|
* a single unmatched call.
|
|
|
|
*/
|
|
|
|
async SuppressDisplayport(bool aEnabled);
|
|
|
|
|
2015-07-13 13:07:49 +03:00
|
|
|
/**
|
2015-07-23 17:04:15 +03:00
|
|
|
* Navigate by key (Tab/Shift+Tab/F6/Shift+f6).
|
2015-07-13 13:07:49 +03:00
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async NavigateByKey(bool aForward, bool aForDocumentNavigation);
|
2015-07-13 13:07:49 +03:00
|
|
|
|
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.
|
2015-08-13 17:42:19 +03:00
|
|
|
* To avoid some sync messages from child to parent, we also send the dpi
|
|
|
|
* and default scale with the notification.
|
|
|
|
* If we don't know the dpi and default scale, we just pass in a negative
|
|
|
|
* value (-1) but in the majority of the cases this saves us from two
|
|
|
|
* sync requests from the child to the parent.
|
2014-05-23 18:36:50 +04:00
|
|
|
*/
|
2016-09-27 09:37:07 +03:00
|
|
|
async UIResolutionChanged(float dpi, int32_t rounding, double scale);
|
2014-05-23 18:36:50 +04:00
|
|
|
|
2015-04-22 17:58:33 +03:00
|
|
|
/**
|
|
|
|
* Tell the child that the system theme has changed, and that a repaint
|
|
|
|
* is necessary.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async ThemeChanged(LookAndFeelInt[] lookAndFeelIntCache);
|
2015-04-22 17:58:33 +03:00
|
|
|
|
2015-05-07 18:43:40 +03:00
|
|
|
/**
|
|
|
|
* Tell the browser that its frame loader has been swapped
|
|
|
|
* with another.
|
|
|
|
*/
|
2016-04-29 01:04:52 +03:00
|
|
|
async SwappedWithOtherRemoteLoader(IPCTabContext context);
|
2015-05-07 18:43:40 +03:00
|
|
|
|
2015-09-18 15:19:13 +03:00
|
|
|
/**
|
|
|
|
* A potential accesskey was just pressed. Look for accesskey targets
|
|
|
|
* using the list of provided charCodes.
|
|
|
|
*
|
2016-05-11 15:56:42 +03:00
|
|
|
* @param event keyboard event
|
2015-09-18 15:19:13 +03:00
|
|
|
* @param isTrusted true if triggered by a trusted key event
|
|
|
|
*/
|
2016-05-11 15:56:42 +03:00
|
|
|
async HandleAccessKey(WidgetKeyboardEvent event,
|
2017-07-06 11:36:19 +03:00
|
|
|
uint32_t[] charCodes);
|
2015-09-18 15:19:13 +03:00
|
|
|
|
2016-03-23 21:39:28 +03:00
|
|
|
/**
|
|
|
|
* Tells the root child docShell whether or not to use
|
|
|
|
* global history. This is sent right after the PBrowser
|
|
|
|
* is bound to a frameloader element.
|
|
|
|
*/
|
|
|
|
async SetUseGlobalHistory(bool aUse);
|
|
|
|
|
Bug 1257759 part.5 PluginInstanceChild should post received native key event to chrome process if the key combination may be a shortcut key r=jimm
When PluginInstanceChild receives native key events, it should post the events to the chrome process first for checking if the key combination is reserved. However, posting all key events to the chrome process may make damage to the performance of text input. Therefore, this patch starts to post a key event whose key combination may be a shortcut key. However, for avoiding to shuffle the event order, it posts following key events until all posted key events are handled by the chrome process.
For receiving response from widget, this patch defines nsIKeyEventInPluginCallback. It's specified by nsIWidget::OnWindowedPluginKeyEvent() for ensuring the caller will receive the reply. Basically, the caller of nsIWidget::OnWindowedPluginKeyEvent() should reply to the child process. However, if the widget is a PuppetWidget, it cannot return the result synchronously. Therefore, PuppetWidget::OnWindowedPluginKeyEvent() returns NS_SUCCESS_EVENT_HANDLED_ASYNCHRONOUSLY and stores the callback to mKeyEventInPluginCallbacks. Then, TabParent::HandledWindowedPluginKeyEvent() will call PuppetWidget::HandledWindowedPluginKeyEvent().
MozReview-Commit-ID: G6brOU26NwQ
--HG--
extra : rebase_source : 8140456de278956d2d594e85c7b397ae366b4962
2016-04-19 14:09:37 +03:00
|
|
|
/**
|
|
|
|
* HandledWindowedPluginKeyEvent() is always called after posting a native
|
|
|
|
* key event with OnWindowedPluginKeyEvent().
|
|
|
|
*
|
|
|
|
* @param aKeyEventData The key event which was posted to the parent
|
|
|
|
* process.
|
|
|
|
* @param aIsConsumed true if aKeyEventData is consumed in the
|
|
|
|
* parent process. Otherwise, false.
|
|
|
|
*/
|
|
|
|
async HandledWindowedPluginKeyEvent(NativeEventData aKeyEventData,
|
|
|
|
bool aIsConsumed);
|
|
|
|
|
2016-05-16 12:40:54 +03:00
|
|
|
/**
|
|
|
|
* Tell the child to print the current page with the given settings.
|
|
|
|
*
|
2016-05-25 09:41:54 +03:00
|
|
|
* @param aOuterWindowID the ID of the outer window to print
|
2016-05-16 12:40:54 +03:00
|
|
|
* @param aPrintData the serialized settings to print with
|
|
|
|
*/
|
2016-05-25 09:41:54 +03:00
|
|
|
async Print(uint64_t aOuterWindowID, PrintData aPrintData);
|
2016-05-16 12:40:54 +03:00
|
|
|
|
2016-09-15 22:37:04 +03:00
|
|
|
/**
|
|
|
|
* Update the child with the tab's current top-level native window handle.
|
|
|
|
* This is used by a11y objects who must expose their native window.
|
|
|
|
*
|
|
|
|
* @param aNewHandle The native window handle of the tab's top-level window.
|
|
|
|
*/
|
|
|
|
async UpdateNativeWindowHandle(uintptr_t aNewHandle);
|
|
|
|
|
2016-10-21 23:56:51 +03:00
|
|
|
/**
|
2017-02-10 01:49:46 +03:00
|
|
|
* Tell the TabChild that it should expect a Large-Allocation load to occur.
|
|
|
|
* Loads which occur until this flag is cleared will not leave the process.
|
2016-10-21 23:56:51 +03:00
|
|
|
*/
|
2017-02-10 01:49:46 +03:00
|
|
|
async AwaitLargeAlloc();
|
2016-10-21 23:56:51 +03:00
|
|
|
|
2017-06-05 20:33:11 +03:00
|
|
|
/**
|
|
|
|
* Tell the TabChild to set the name of its toplevel docshell to the given name.
|
|
|
|
*/
|
|
|
|
async SetWindowName(nsString aName);
|
|
|
|
|
2017-06-06 21:22:17 +03:00
|
|
|
/**
|
|
|
|
* Tell the TabChild what OriginAttributes it should inherit from. This must
|
|
|
|
* be called before the first non-blank document is loaded in the TabChild.
|
|
|
|
*/
|
|
|
|
async SetOriginAttributes(OriginAttributes aOriginAttributes);
|
|
|
|
|
2017-06-13 20:37:31 +03:00
|
|
|
/**
|
|
|
|
* Pass the current handle for the current native widget to the content
|
|
|
|
* process, so it can be used by PuppetWidget.
|
|
|
|
*/
|
|
|
|
async SetWidgetNativeData(WindowsHandle aHandle);
|
|
|
|
|
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
|
|
|
}
|