2009-09-10 02:00:14 +04:00
|
|
|
/* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8 -*- */
|
2009-08-18 23:05:15 +04:00
|
|
|
/* vim: set sw=4 ts=8 et tw=80 ft=cpp : */
|
|
|
|
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-08-26 03:07:22 +04:00
|
|
|
|
2012-08-02 10:02:29 +04:00
|
|
|
include protocol PBlob;
|
2014-02-24 00:19:43 +04:00
|
|
|
include protocol PColorPicker;
|
2010-07-19 22:33:33 +04:00
|
|
|
include protocol PContent;
|
2014-06-11 09:44:13 +04:00
|
|
|
include protocol PContentBridge;
|
2016-06-20 16:55:00 +03:00
|
|
|
include protocol PDatePicker;
|
2015-05-21 20:04:58 +03:00
|
|
|
include protocol PDocAccessible;
|
2010-04-27 11:12:38 +04:00
|
|
|
include protocol PDocumentRenderer;
|
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;
|
2012-08-23 23:33:46 +04:00
|
|
|
include DOMTypes;
|
2013-07-11 02:05:39 +04:00
|
|
|
include JavaScriptTypes;
|
2012-08-23 23:33:46 +04:00
|
|
|
include URIParams;
|
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
|
|
|
|
2012-08-02 10:02:29 +04:00
|
|
|
|
2013-10-01 23:25:07 +04:00
|
|
|
using class IPC::Principal from "mozilla/dom/PermissionMessageUtils.h";
|
2014-06-19 04:57:51 +04:00
|
|
|
using class mozilla::gfx::Matrix from "mozilla/gfx/Matrix.h";
|
2013-10-01 23:25:07 +04:00
|
|
|
using struct gfxSize from "gfxPoint.h";
|
|
|
|
using CSSRect from "Units.h";
|
2015-06-08 08:39:28 +03:00
|
|
|
using CSSSize from "Units.h";
|
2015-12-03 08:45:38 +03:00
|
|
|
using mozilla::LayoutDeviceIntRect from "Units.h";
|
2015-04-07 16:00:05 +03:00
|
|
|
using mozilla::LayoutDeviceIntPoint 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";
|
2015-06-17 19:32:41 +03:00
|
|
|
using mozilla::layers::MaybeZoomConstraints from "FrameMetrics.h";
|
2013-10-01 23:25:07 +04:00
|
|
|
using FrameMetrics::ViewID from "FrameMetrics.h";
|
|
|
|
using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
|
|
|
|
using mozilla::WindowsHandle from "ipc/IPCMessageUtils.h";
|
|
|
|
using nscolor from "nsColor.h";
|
|
|
|
using class mozilla::WidgetCompositionEvent from "ipc/nsGUIEventIPC.h";
|
2014-09-11 17:46:17 +04:00
|
|
|
using struct mozilla::widget::IMENotification from "nsIWidget.h";
|
2013-10-01 23:25:07 +04:00
|
|
|
using struct nsIMEUpdatePreference from "nsIWidget.h";
|
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";
|
2015-08-19 00:55:09 +03:00
|
|
|
using mozilla::dom::ScreenOrientationInternal from "mozilla/dom/ScreenOrientation.h";
|
2013-10-01 23:25:07 +04:00
|
|
|
using struct mozilla::layers::TextureFactoryIdentifier from "mozilla/layers/CompositorTypes.h";
|
|
|
|
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-03-19 13:33:33 +03:00
|
|
|
using mozilla::layers::TouchBehaviorFlags from "mozilla/layers/APZUtils.h";
|
2015-04-14 18:36:36 +03:00
|
|
|
using nsIWidget::TouchPointerState from "nsIWidget.h";
|
2015-04-22 17:58:33 +03:00
|
|
|
using struct LookAndFeelInt from "mozilla/widget/WidgetMessageUtils.h";
|
2015-09-10 23:50:58 +03:00
|
|
|
using class mozilla::dom::ipc::StructuredCloneData from "ipc/IPCMessageUtils.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";
|
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";
|
2013-10-01 23:25:07 +04:00
|
|
|
|
2009-08-26 03:07:22 +04:00
|
|
|
namespace mozilla {
|
2009-09-10 02:00:14 +04:00
|
|
|
namespace dom {
|
2009-08-26 03:07:22 +04:00
|
|
|
|
2014-03-20 19:46:29 +04:00
|
|
|
struct NativeKeyBinding
|
|
|
|
{
|
|
|
|
CommandInt[] singleLineCommands;
|
|
|
|
CommandInt[] multiLineCommands;
|
|
|
|
CommandInt[] richTextCommands;
|
|
|
|
};
|
|
|
|
|
|
|
|
union MaybeNativeKeyBinding
|
|
|
|
{
|
|
|
|
NativeKeyBinding;
|
|
|
|
void_t;
|
|
|
|
};
|
|
|
|
|
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;
|
|
|
|
double defaultScale;
|
2014-11-24 22:05:35 +03:00
|
|
|
};
|
|
|
|
|
2016-06-15 15:49:13 +03:00
|
|
|
union OptionalShmem
|
|
|
|
{
|
|
|
|
void_t;
|
|
|
|
Shmem;
|
|
|
|
};
|
|
|
|
|
2015-01-28 22:53:46 +03:00
|
|
|
prio(normal upto urgent) sync protocol PBrowser
|
2009-08-26 03:07:22 +04:00
|
|
|
{
|
2014-06-11 09:44:13 +04:00
|
|
|
manager PContent or PContentBridge;
|
2010-07-19 22:33:33 +04:00
|
|
|
|
2014-02-24 00:19:43 +04:00
|
|
|
manages PColorPicker;
|
2016-06-20 16:55:00 +03:00
|
|
|
manages PDatePicker;
|
2015-05-21 20:04:58 +03:00
|
|
|
manages PDocAccessible;
|
2009-10-29 20:58:31 +03:00
|
|
|
manages PDocumentRenderer;
|
2014-02-18 04:30:06 +04:00
|
|
|
manages PFilePicker;
|
2014-09-27 03:21:57 +04:00
|
|
|
manages PIndexedDBPermissionRequest;
|
2010-08-21 03:24:41 +04:00
|
|
|
manages PRenderFrame;
|
2014-11-12 23:59:18 +03:00
|
|
|
manages PPluginWidget;
|
2010-07-19 22:33:33 +04:00
|
|
|
|
|
|
|
both:
|
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
|
|
|
|
* is a child of.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async PDocAccessible(nullable PDocAccessible aParentDoc, uint64_t aParentAcc);
|
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();
|
|
|
|
|
2015-01-23 13:10:52 +03:00
|
|
|
/**
|
|
|
|
* Return native data of root widget
|
|
|
|
*/
|
|
|
|
sync GetWidgetNativeData() returns (WindowsHandle value);
|
|
|
|
|
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);
|
|
|
|
|
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
|
|
|
|
2014-10-08 08:32:45 +04:00
|
|
|
prio(high) 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
|
2010-09-24 07:28:15 +04:00
|
|
|
* preference Native widget preference for IME updates
|
|
|
|
*/
|
2015-07-17 07:30:01 +03:00
|
|
|
prio(urgent) sync NotifyIMEFocus(ContentCache contentCache,
|
|
|
|
IMENotification notification)
|
2015-05-28 07:51:40 +03:00
|
|
|
returns (nsIMEUpdatePreference preference);
|
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
|
|
|
*/
|
2015-06-05 12:28:20 +03:00
|
|
|
prio(urgent) async NotifyIMETextChange(ContentCache contentCache,
|
2015-07-17 07:30:01 +03:00
|
|
|
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
|
|
|
*/
|
2015-07-17 07:30:01 +03:00
|
|
|
prio(urgent) 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
|
|
|
*/
|
2015-06-05 12:28:20 +03:00
|
|
|
prio(urgent) async NotifyIMESelection(ContentCache contentCache,
|
2015-07-17 07:30:01 +03:00
|
|
|
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
|
|
|
*/
|
2015-06-05 12:28:20 +03:00
|
|
|
prio(urgent) 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.
|
|
|
|
*
|
|
|
|
* Returns true if the mouse button event is consumd by IME.
|
|
|
|
*/
|
2014-10-31 01:51:39 +03:00
|
|
|
prio(urgent) sync NotifyIMEMouseButtonEvent(IMENotification notification)
|
2014-09-11 17:46:17 +04:00
|
|
|
returns (bool consumedByIME);
|
|
|
|
|
2014-12-15 12: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
|
|
|
*/
|
2015-07-17 07:30:01 +03:00
|
|
|
prio(urgent) 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
|
|
|
*/
|
2015-12-11 09:15:58 +03:00
|
|
|
prio(urgent) sync RequestIMEToCommitComposition(bool cancel)
|
|
|
|
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
|
|
|
*/
|
2015-08-26 15:56:59 +03:00
|
|
|
prio(urgent) 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
|
|
|
|
*/
|
|
|
|
prio(urgent) sync StartPluginIME(WidgetKeyboardEvent aKeyboardEvent,
|
|
|
|
int32_t panelX, int32_t panelY)
|
|
|
|
returns (nsString aCommitted);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Tells chrome (and specifically the appropriate widget) whether or not
|
|
|
|
* a plugin (inside the widget) has the keyboard focus. Should be sent
|
|
|
|
* when the keyboard focus changes too or from a plugin.
|
|
|
|
*
|
|
|
|
* aFocused Whether or not a plugin is focused
|
|
|
|
*/
|
|
|
|
prio(urgent) async SetPluginFocused(bool aFocused);
|
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
prio(urgent) async OnWindowedPluginKeyEvent(NativeEventData aKeyEventData);
|
|
|
|
|
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
|
|
|
|
2014-10-31 01:51:39 +03:00
|
|
|
prio(urgent) sync GetInputContext() returns (int32_t IMEEnabled,
|
2015-12-11 09:15:57 +03:00
|
|
|
int32_t IMEOpen);
|
2014-10-31 01:51:39 +03:00
|
|
|
|
2015-01-21 01:01:24 +03:00
|
|
|
prio(urgent) async SetInputContext(int32_t IMEEnabled,
|
|
|
|
int32_t IMEOpen,
|
|
|
|
nsString type,
|
|
|
|
nsString inputmode,
|
|
|
|
nsString actionHint,
|
|
|
|
int32_t cause,
|
|
|
|
int32_t focusChange);
|
2010-09-24 07:28:15 +04:00
|
|
|
|
2014-04-05 01:50:42 +04:00
|
|
|
sync IsParentWindowMainWidgetVisible() returns (bool visible);
|
|
|
|
|
2010-12-03 04:24:04 +03:00
|
|
|
/**
|
|
|
|
* Gets the DPI of the screen corresponding to this browser.
|
|
|
|
*/
|
|
|
|
sync GetDPI() returns (float value);
|
|
|
|
|
2013-05-02 03:06:19 +04:00
|
|
|
/**
|
|
|
|
* Gets the default scaling factor of the screen corresponding to this browser.
|
|
|
|
*/
|
|
|
|
sync GetDefaultScale() returns (double value);
|
|
|
|
|
2015-05-08 04:29:00 +03:00
|
|
|
/**
|
|
|
|
* Gets maximum of touch points at current device.
|
|
|
|
*/
|
|
|
|
sync GetMaxTouchPoints() returns (uint32_t value);
|
|
|
|
|
2014-05-28 05:12:29 +04:00
|
|
|
/**
|
|
|
|
* Set the native cursor.
|
|
|
|
* @param value
|
|
|
|
* The widget cursor to set.
|
|
|
|
* @param force
|
|
|
|
* Invalidate any locally cached cursor settings and force an
|
|
|
|
* update.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async SetCursor(uint32_t 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,
|
|
|
|
uint32_t stride, uint8_t format,
|
|
|
|
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-06-20 16:55:00 +03:00
|
|
|
/**
|
|
|
|
* Create an asynchronous date picker on the parent side,
|
|
|
|
* but don't open it yet.
|
|
|
|
*/
|
|
|
|
async PDatePicker(nsString title, nsString initialDate);
|
|
|
|
|
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.
|
|
|
|
*/
|
2016-03-31 07:58:05 +03:00
|
|
|
sync BrowserFrameOpenWindow(PBrowser opener, PRenderFrame renderFrame,
|
|
|
|
nsString aURL, nsString aName, nsString aFeatures)
|
|
|
|
returns (bool windowOpened,
|
|
|
|
TextureFactoryIdentifier textureFactoryIdentifier,
|
|
|
|
uint64_t layersId);
|
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
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async DispatchAfterKeyboardEvent(WidgetKeyboardEvent event);
|
2014-11-03 10:05:38 +03:00
|
|
|
|
2014-04-22 00:40:09 +04:00
|
|
|
sync RequestNativeKeyBindings(WidgetKeyboardEvent event)
|
|
|
|
returns (MaybeNativeKeyBinding bindings);
|
|
|
|
|
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);
|
|
|
|
|
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
|
|
|
|
2015-08-06 17:44:16 +03:00
|
|
|
|
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();
|
|
|
|
|
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);
|
|
|
|
|
2015-03-25 01:00:52 +03:00
|
|
|
prio(high) sync DispatchWheelEvent(WidgetWheelEvent event);
|
|
|
|
prio(high) sync DispatchMouseEvent(WidgetMouseEvent event);
|
|
|
|
prio(high) 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,
|
|
|
|
uint32_t width, uint32_t height,
|
2016-01-27 00:51:53 +03:00
|
|
|
uint32_t stride, uint8_t format,
|
|
|
|
int32_t dragAreaX, int32_t dragAreaY);
|
2015-07-10 19:38:44 +03:00
|
|
|
|
|
|
|
async AudioChannelActivityNotification(uint32_t aAudioChannel,
|
|
|
|
bool aActive);
|
|
|
|
|
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,
|
|
|
|
TextureFactoryIdentifier textureFactoryIdentifier,
|
|
|
|
uint64_t layersId,
|
|
|
|
nullable PRenderFrame renderFrame,
|
2016-02-23 19:10:00 +03:00
|
|
|
bool parentIsActive,
|
|
|
|
nsSizeMode sizeMode);
|
2009-10-28 23:41:46 +03:00
|
|
|
|
2016-07-11 01:28:13 +03:00
|
|
|
async LoadURL(nsCString uri, ShowInfo info);
|
2009-09-10 02:00:14 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async CacheFileDescriptor(nsString path, FileDescriptor fd);
|
2013-02-16 02:27:21 +04:00
|
|
|
|
2016-02-23 19:10:00 +03:00
|
|
|
async UpdateDimensions(CSSRect rect, CSSSize size,
|
2016-01-27 00:51:53 +03:00
|
|
|
ScreenOrientationInternal orientation,
|
2016-03-08 22:14:43 +03:00
|
|
|
LayoutDeviceIntPoint clientOffset,
|
2016-01-27 00:51:53 +03:00
|
|
|
LayoutDeviceIntPoint chromeDisp) compressall;
|
2009-10-29 20:58:31 +03:00
|
|
|
|
2016-02-23 19:10:00 +03:00
|
|
|
async SizeModeChanged(nsSizeMode sizeMode);
|
|
|
|
|
2009-11-05 21:14:22 +03:00
|
|
|
/**
|
|
|
|
* Sending an activate message moves focus to the child.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async Activate();
|
2010-03-19 09:52:18 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async Deactivate();
|
2011-06-18 04:08:32 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async ParentActivated(bool aActivated);
|
2014-11-27 16:28:26 +03:00
|
|
|
|
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
|
|
|
|
2015-07-01 16:19:11 +03:00
|
|
|
/**
|
|
|
|
* MenuKeyboardListenerInstalled() is called when menu keyboard listener
|
|
|
|
* is installed in the parent process.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async MenuKeyboardListenerInstalled(bool aInstalled);
|
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.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async RealMouseMoveEvent(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.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async SynthMouseMoveEvent(WidgetMouseEvent event, ScrollableLayerGuid aGuid, uint64_t aInputBlockId);
|
|
|
|
async RealMouseButtonEvent(WidgetMouseEvent event, ScrollableLayerGuid aGuid, uint64_t aInputBlockId);
|
|
|
|
async RealKeyEvent(WidgetKeyboardEvent event, MaybeNativeKeyBinding keyBinding);
|
|
|
|
async MouseWheelEvent(WidgetWheelEvent event, ScrollableLayerGuid aGuid, uint64_t aInputBlockId);
|
|
|
|
async RealTouchEvent(WidgetTouchEvent aEvent,
|
|
|
|
ScrollableLayerGuid aGuid,
|
|
|
|
uint64_t aInputBlockId,
|
|
|
|
nsEventStatus aApzResponse);
|
|
|
|
async RealTouchMoveEvent(WidgetTouchEvent aEvent,
|
|
|
|
ScrollableLayerGuid aGuid,
|
|
|
|
uint64_t aInputBlockId,
|
|
|
|
nsEventStatus aApzResponse);
|
|
|
|
async RealDragEvent(WidgetDragEvent aEvent, uint32_t aDragAction, uint32_t aDropEffect);
|
|
|
|
async PluginEvent(WidgetPluginEvent aEvent);
|
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
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async KeyEvent(nsString aType,
|
|
|
|
int32_t aKeyCode,
|
|
|
|
int32_t aCharCode,
|
|
|
|
int32_t aModifiers,
|
|
|
|
bool aPreventDefault);
|
2009-11-17 17:22:23 +03:00
|
|
|
|
2015-03-22 10:42:26 +03:00
|
|
|
/**
|
|
|
|
* APZ notification for mouse scroll testing events.
|
|
|
|
*/
|
2016-01-08 22:17:39 +03:00
|
|
|
async MouseScrollTestEvent(uint64_t aLayersId, ViewID aScrollId, nsString aEvent);
|
2015-03-22 10:42:26 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async CompositionEvent(WidgetCompositionEvent event);
|
2010-08-17 12:07:42 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async SelectionEvent(WidgetSelectionEvent event);
|
2010-08-17 12:07:42 +04:00
|
|
|
|
2010-07-19 22:33:33 +04:00
|
|
|
/**
|
|
|
|
* Activate event forwarding from client to parent.
|
|
|
|
*/
|
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-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
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async PDocumentRenderer(nsRect documentRect, Matrix transform,
|
|
|
|
nsString bgcolor,
|
|
|
|
uint32_t renderFlags, bool flushLayout,
|
|
|
|
IntSize renderSize);
|
2010-03-24 13:47:18 +03:00
|
|
|
|
2010-08-06 02:11:23 +04:00
|
|
|
/**
|
|
|
|
* Sent by the chrome process when it no longer wants this remote
|
|
|
|
* <browser>. The child side cleans up in response, then
|
|
|
|
* finalizing its death by sending back __delete__() to the
|
|
|
|
* parent.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async Destroy();
|
2010-08-06 02:11:23 +04:00
|
|
|
|
2013-08-13 11:56:57 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Tell the child side if it has to update it's touchable region
|
|
|
|
* to the parent.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async SetUpdateHitRegion(bool aEnabled);
|
2013-08-13 11:56:57 +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.
|
2014-02-20 15:26:13 +04:00
|
|
|
*/
|
2016-07-23 02:36:45 +03:00
|
|
|
async SetDocShellIsActive(bool aIsActive, bool aIsHidden, 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-01-27 00:51:53 +03:00
|
|
|
async UIResolutionChanged(float dpi, 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
|
|
|
|
2014-08-23 03:17:18 +04:00
|
|
|
/**
|
|
|
|
* Tell the child of an app's offline status
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async AppOfflineStatus(uint32_t id, bool offline);
|
2014-08-23 03:17:18 +04: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
|
|
|
|
* @param modifierMask indicates which accesskey modifiers are pressed
|
|
|
|
*/
|
2016-05-11 15:56:42 +03:00
|
|
|
async HandleAccessKey(WidgetKeyboardEvent event,
|
|
|
|
uint32_t[] charCodes, int32_t modifierMask);
|
2015-09-18 15:19:13 +03:00
|
|
|
|
2015-12-11 19:17:33 +03:00
|
|
|
/**
|
|
|
|
* Propagate a refresh to the child process
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async AudioChannelChangeNotification(uint32_t aAudioChannel,
|
|
|
|
float aVolume,
|
|
|
|
bool aMuted);
|
2015-12-11 19:17:33 +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
|
|
|
|
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
|
|
|
}
|