2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
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-07-01 00:39:22 +04:00
|
|
|
|
2010-08-21 03:24:41 +04:00
|
|
|
#ifndef mozilla_dom_TabChild_h
|
|
|
|
#define mozilla_dom_TabChild_h
|
2009-07-01 00:39:22 +04:00
|
|
|
|
2017-07-19 15:59:02 +03:00
|
|
|
#include "mozilla/dom/ContentFrameMessageManager.h"
|
2010-07-19 22:33:33 +04:00
|
|
|
#include "mozilla/dom/PBrowserChild.h"
|
2009-07-01 00:39:22 +04:00
|
|
|
#include "nsIWebNavigation.h"
|
|
|
|
#include "nsCOMPtr.h"
|
2009-11-05 21:14:22 +03:00
|
|
|
#include "nsAutoPtr.h"
|
|
|
|
#include "nsIWebBrowserChrome2.h"
|
2012-06-10 02:15:12 +04:00
|
|
|
#include "nsIEmbeddingSiteWindow.h"
|
2009-11-05 21:14:22 +03:00
|
|
|
#include "nsIWebBrowserChromeFocus.h"
|
2009-11-17 17:22:23 +03:00
|
|
|
#include "nsIDOMEventListener.h"
|
2010-01-01 04:34:06 +03:00
|
|
|
#include "nsIInterfaceRequestor.h"
|
2010-01-01 04:35:55 +03:00
|
|
|
#include "nsIWindowProvider.h"
|
2010-02-20 20:05:20 +03:00
|
|
|
#include "nsIDOMWindow.h"
|
2010-03-03 23:30:25 +03:00
|
|
|
#include "nsIDocShell.h"
|
2013-09-24 01:30:40 +04:00
|
|
|
#include "nsIInterfaceRequestorUtils.h"
|
2010-02-20 20:05:20 +03:00
|
|
|
#include "nsFrameMessageManager.h"
|
2010-08-06 02:11:23 +04:00
|
|
|
#include "nsIPresShell.h"
|
2010-02-20 20:05:20 +03:00
|
|
|
#include "nsIScriptObjectPrincipal.h"
|
2010-03-26 21:39:39 +03:00
|
|
|
#include "nsWeakReference.h"
|
2010-05-13 21:44:51 +04:00
|
|
|
#include "nsITabChild.h"
|
2014-01-23 00:27:23 +04:00
|
|
|
#include "nsITooltipListener.h"
|
2012-06-15 06:31:55 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
Bug 802366 - The main event: Let a browser process inherit its app's id. r=bz,cjones
The main bug fixed here is that in half of our interfaces, we use "is browser frame/element" to mean "browser or app", and in the other half, we use it to mean "is browser not app".
There's a related, functional bug also fixed here, which is that a browser process doesn't inherit its parent's app-id. This causes problems e.g. for IndexedDB: If a browser inside an app uses IndexedDB, the DB should have the app's app-id.
I also modified Tab{Parent,Child} and nsFrameLoader to call "app" "ownOrContainingApp", to emphasize that we might have inherited the app from a parent process. I left nsIDocShell::appId alone, because changing that would have necessitated changing nsILoadGroup and therefore a /lot/ of users in Necko; it's also not clear it would have clarified anything in those cases.
2012-11-10 22:32:37 +04:00
|
|
|
#include "mozilla/dom/TabContext.h"
|
2017-08-11 09:58:08 +03:00
|
|
|
#include "mozilla/dom/CoalescedMouseData.h"
|
2017-02-21 12:56:46 +03:00
|
|
|
#include "mozilla/dom/CoalescedWheelData.h"
|
2014-04-01 10:13:50 +04:00
|
|
|
#include "mozilla/DOMEventTargetHelper.h"
|
2014-03-18 08:48:21 +04:00
|
|
|
#include "mozilla/EventDispatcher.h"
|
2013-09-25 15:21:16 +04:00
|
|
|
#include "mozilla/EventForwards.h"
|
2013-10-19 00:57:55 +04:00
|
|
|
#include "mozilla/layers/CompositorTypes.h"
|
2015-09-11 19:27:49 +03:00
|
|
|
#include "mozilla/layers/APZCCallbackHelper.h"
|
2017-01-13 01:29:41 +03:00
|
|
|
#include "mozilla/layers/CompositorOptions.h"
|
2014-09-03 01:43:08 +04:00
|
|
|
#include "nsIWebBrowserChrome3.h"
|
2014-10-29 21:11:00 +03:00
|
|
|
#include "mozilla/dom/ipc/IdType.h"
|
2015-08-05 05:47:10 +03:00
|
|
|
#include "AudioChannelService.h"
|
2015-06-17 11:44:50 +03:00
|
|
|
#include "PuppetWidget.h"
|
2016-01-08 22:17:39 +03:00
|
|
|
#include "mozilla/layers/GeckoContentController.h"
|
2017-10-12 04:05:40 +03:00
|
|
|
#include "nsDeque.h"
|
2016-10-14 10:31:02 +03:00
|
|
|
#include "nsISHistoryListener.h"
|
2009-07-01 00:39:22 +04:00
|
|
|
|
2013-06-15 01:47:56 +04:00
|
|
|
class nsIDOMWindowUtils;
|
2016-10-21 23:56:51 +03:00
|
|
|
class nsIHttpChannel;
|
2017-07-05 11:23:23 +03:00
|
|
|
class nsISerialEventTarget;
|
2010-03-24 13:47:18 +03:00
|
|
|
|
2017-09-13 06:59:35 +03:00
|
|
|
template<typename T> class nsTHashtable;
|
|
|
|
template<typename T> class nsPtrHashKey;
|
|
|
|
|
2009-07-01 00:39:22 +04:00
|
|
|
namespace mozilla {
|
2017-07-05 11:23:23 +03:00
|
|
|
class AbstractThread;
|
2010-08-21 03:24:41 +04:00
|
|
|
namespace layout {
|
|
|
|
class RenderFrameChild;
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace layout
|
2010-08-21 03:24:41 +04:00
|
|
|
|
2014-04-17 15:54:25 +04:00
|
|
|
namespace layers {
|
2016-01-08 22:17:39 +03:00
|
|
|
class APZChild;
|
2015-02-09 22:05:18 +03:00
|
|
|
class APZEventState;
|
2016-01-08 22:17:39 +03:00
|
|
|
class AsyncDragMetrics;
|
2016-07-31 22:39:00 +03:00
|
|
|
class IAPZCTreeManager;
|
2015-07-06 06:02:26 +03:00
|
|
|
class ImageCompositeNotification;
|
2017-10-13 17:32:52 +03:00
|
|
|
class PCompositorBridgeChild;
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace layers
|
2014-04-09 23:16:16 +04:00
|
|
|
|
2014-04-22 00:40:09 +04:00
|
|
|
namespace widget {
|
|
|
|
struct AutoCacheNativeKeyCommands;
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace widget
|
2014-04-22 00:40:09 +04:00
|
|
|
|
2009-08-12 20:18:08 +04:00
|
|
|
namespace dom {
|
2009-07-01 00:39:22 +04:00
|
|
|
|
2009-11-17 17:22:23 +03:00
|
|
|
class TabChild;
|
2016-11-04 21:13:52 +03:00
|
|
|
class TabGroup;
|
2012-08-02 10:02:29 +04:00
|
|
|
class ClonedMessageData;
|
2017-08-11 09:58:08 +03:00
|
|
|
class CoalescedMouseData;
|
2017-02-21 12:56:46 +03:00
|
|
|
class CoalescedWheelData;
|
2009-11-17 17:22:23 +03:00
|
|
|
|
2017-07-19 15:59:02 +03:00
|
|
|
class TabChildGlobal : public ContentFrameMessageManager,
|
2010-02-20 20:05:20 +03:00
|
|
|
public nsIContentFrameMessageManager,
|
2013-12-12 05:51:56 +04:00
|
|
|
public nsIScriptObjectPrincipal,
|
2015-01-18 06:17:06 +03:00
|
|
|
public nsIGlobalObject,
|
|
|
|
public nsSupportsWeakReference
|
2010-02-20 20:05:20 +03:00
|
|
|
{
|
|
|
|
public:
|
2017-07-05 11:23:23 +03:00
|
|
|
explicit TabChildGlobal(TabChild* aTabChild);
|
2012-04-27 00:56:46 +04:00
|
|
|
void Init();
|
2010-02-20 20:05:20 +03:00
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
2014-04-01 10:13:50 +04:00
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TabChildGlobal, DOMEventTargetHelper)
|
2018-03-01 12:51:09 +03:00
|
|
|
|
2018-02-16 17:28:31 +03:00
|
|
|
void MarkForCC();
|
|
|
|
|
2017-07-19 15:59:02 +03:00
|
|
|
virtual JSObject* WrapObject(JSContext* aCx,
|
|
|
|
JS::Handle<JSObject*> aGivenProto) override
|
2018-03-01 12:51:09 +03:00
|
|
|
{
|
2017-07-19 15:59:02 +03:00
|
|
|
MOZ_CRASH("We should never get here!");
|
2018-03-01 12:51:09 +03:00
|
|
|
}
|
2017-07-19 15:59:02 +03:00
|
|
|
bool WrapGlobalObject(JSContext* aCx,
|
2018-05-17 11:59:45 +03:00
|
|
|
JS::RealmOptions& aOptions,
|
2017-07-19 15:59:02 +03:00
|
|
|
JS::MutableHandle<JSObject*> aReflector);
|
|
|
|
|
|
|
|
virtual already_AddRefed<nsPIDOMWindowOuter> GetContent(ErrorResult& aError) override;
|
|
|
|
virtual already_AddRefed<nsIDocShell> GetDocShell(ErrorResult& aError) override;
|
|
|
|
virtual already_AddRefed<nsIEventTarget> GetTabEventTarget() override;
|
|
|
|
|
|
|
|
NS_FORWARD_SAFE_NSIMESSAGESENDER(mMessageManager)
|
|
|
|
NS_DECL_NSICONTENTFRAMEMESSAGEMANAGER
|
2010-02-20 20:05:20 +03:00
|
|
|
|
2018-04-05 20:42:41 +03:00
|
|
|
void
|
2016-10-21 05:11:07 +03:00
|
|
|
GetEventTargetParent(EventChainPreVisitor& aVisitor) override
|
2013-08-09 04:16:47 +04:00
|
|
|
{
|
|
|
|
aVisitor.mForceContentDispatch = true;
|
|
|
|
}
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsIPrincipal* GetPrincipal() override;
|
|
|
|
virtual JSObject* GetGlobalJSObject() override;
|
2010-02-20 20:05:20 +03:00
|
|
|
|
2017-07-05 11:23:23 +03:00
|
|
|
// Dispatch a runnable related to the global.
|
2017-07-26 11:13:35 +03:00
|
|
|
virtual nsresult Dispatch(mozilla::TaskCategory aCategory,
|
2017-07-05 11:23:23 +03:00
|
|
|
already_AddRefed<nsIRunnable>&& aRunnable) override;
|
|
|
|
|
|
|
|
virtual nsISerialEventTarget*
|
|
|
|
EventTargetFor(mozilla::TaskCategory aCategory) const override;
|
|
|
|
|
|
|
|
virtual AbstractThread*
|
|
|
|
AbstractMainThreadFor(mozilla::TaskCategory aCategory) override;
|
|
|
|
|
|
|
|
RefPtr<TabChild> mTabChild;
|
2014-07-09 01:23:17 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
~TabChildGlobal();
|
2010-02-20 20:05:20 +03:00
|
|
|
};
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class ContentListener final : public nsIDOMEventListener
|
2009-11-17 17:22:23 +03:00
|
|
|
{
|
|
|
|
public:
|
2014-08-05 17:19:51 +04:00
|
|
|
explicit ContentListener(TabChild* aTabChild) : mTabChild(aTabChild) {}
|
2009-11-17 17:22:23 +03:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIDOMEVENTLISTENER
|
|
|
|
protected:
|
2014-06-23 23:56:07 +04:00
|
|
|
~ContentListener() {}
|
2009-11-17 17:22:23 +03:00
|
|
|
TabChild* mTabChild;
|
|
|
|
};
|
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
// This is base clase which helps to share Viewport and touch related
|
|
|
|
// functionality between b2g/android FF/embedlite clients implementation.
|
|
|
|
// It make sense to place in this class all helper functions, and functionality
|
|
|
|
// which could be shared between Cross-process/Cross-thread implmentations.
|
2014-04-23 01:26:45 +04:00
|
|
|
class TabChildBase : public nsISupports,
|
2015-02-20 04:10:44 +03:00
|
|
|
public nsMessageManagerScriptExecutor,
|
2014-03-25 06:28:46 +04:00
|
|
|
public ipc::MessageManagerCallback
|
|
|
|
{
|
2015-06-17 11:44:50 +03:00
|
|
|
protected:
|
2016-01-05 12:59:30 +03:00
|
|
|
typedef mozilla::widget::PuppetWidget PuppetWidget;
|
2015-06-17 11:44:50 +03:00
|
|
|
|
2014-03-25 06:28:46 +04:00
|
|
|
public:
|
2016-01-05 12:59:30 +03:00
|
|
|
TabChildBase();
|
2014-06-13 21:56:38 +04:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TabChildBase)
|
2014-03-25 06:28:46 +04:00
|
|
|
|
2017-07-19 15:59:02 +03:00
|
|
|
virtual bool WrapGlobalObject(JSContext* aCx,
|
2018-05-17 11:59:45 +03:00
|
|
|
JS::RealmOptions& aOptions,
|
2017-07-19 15:59:02 +03:00
|
|
|
JS::MutableHandle<JSObject*> aReflector) override
|
|
|
|
{
|
|
|
|
return mTabChildGlobal->WrapGlobalObject(aCx, aOptions, aReflector);
|
|
|
|
}
|
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
virtual nsIWebNavigation* WebNavigation() const = 0;
|
|
|
|
virtual PuppetWidget* WebWidget() = 0;
|
|
|
|
nsIPrincipal* GetPrincipal() { return mPrincipal; }
|
|
|
|
virtual bool DoUpdateZoomConstraints(const uint32_t& aPresShellId,
|
|
|
|
const mozilla::layers::FrameMetrics::ViewID& aViewId,
|
|
|
|
const Maybe<mozilla::layers::ZoomConstraints>& aConstraints) = 0;
|
2014-03-25 06:28:46 +04:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
virtual ScreenIntSize GetInnerSize() = 0;
|
2015-06-08 08:39:28 +03:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
// Get the Document for the top-level window in this tab.
|
|
|
|
already_AddRefed<nsIDocument> GetDocument() const;
|
2015-09-21 15:54:00 +03:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
// Get the pres-shell of the document for the top-level window in this tab.
|
|
|
|
already_AddRefed<nsIPresShell> GetPresShell() const;
|
2014-03-25 06:28:46 +04:00
|
|
|
|
2016-05-16 05:56:09 +03:00
|
|
|
protected:
|
|
|
|
virtual ~TabChildBase();
|
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
// Wraps up a JSON object as a structured clone and sends it to the browser
|
|
|
|
// chrome script.
|
|
|
|
//
|
|
|
|
// XXX/bug 780335: Do the work the browser chrome script does in C++ instead
|
|
|
|
// so we don't need things like this.
|
|
|
|
void DispatchMessageManagerMessage(const nsAString& aMessageName,
|
|
|
|
const nsAString& aJSONData);
|
2014-03-25 06:28:46 +04:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
void ProcessUpdateFrame(const mozilla::layers::FrameMetrics& aFrameMetrics);
|
2014-03-25 06:28:46 +04:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
bool UpdateFrameHandler(const mozilla::layers::FrameMetrics& aFrameMetrics);
|
2014-03-25 06:28:46 +04:00
|
|
|
|
|
|
|
protected:
|
2016-01-05 12:59:30 +03:00
|
|
|
RefPtr<TabChildGlobal> mTabChildGlobal;
|
|
|
|
nsCOMPtr<nsIWebBrowserChrome3> mWebBrowserChrome;
|
2014-03-25 06:28:46 +04:00
|
|
|
};
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class TabChild final : public TabChildBase,
|
2015-03-27 21:52:19 +03:00
|
|
|
public PBrowserChild,
|
|
|
|
public nsIWebBrowserChrome2,
|
|
|
|
public nsIEmbeddingSiteWindow,
|
|
|
|
public nsIWebBrowserChromeFocus,
|
|
|
|
public nsIInterfaceRequestor,
|
|
|
|
public nsIWindowProvider,
|
|
|
|
public nsSupportsWeakReference,
|
|
|
|
public nsITabChild,
|
|
|
|
public nsIObserver,
|
|
|
|
public TabContext,
|
2016-06-15 15:49:13 +03:00
|
|
|
public nsITooltipListener,
|
|
|
|
public mozilla::ipc::IShmemAllocator
|
2009-07-01 00:39:22 +04:00
|
|
|
{
|
2016-01-05 12:59:30 +03:00
|
|
|
typedef mozilla::dom::ClonedMessageData ClonedMessageData;
|
2017-08-11 09:58:08 +03:00
|
|
|
typedef mozilla::dom::CoalescedMouseData CoalescedMouseData;
|
2017-02-21 12:56:46 +03:00
|
|
|
typedef mozilla::dom::CoalescedWheelData CoalescedWheelData;
|
2016-01-05 12:59:30 +03:00
|
|
|
typedef mozilla::layout::RenderFrameChild RenderFrameChild;
|
|
|
|
typedef mozilla::layers::APZEventState APZEventState;
|
|
|
|
typedef mozilla::layers::SetAllowedTouchBehaviorCallback SetAllowedTouchBehaviorCallback;
|
2018-03-15 01:18:27 +03:00
|
|
|
typedef mozilla::layers::TouchBehaviorFlags TouchBehaviorFlags;
|
2010-08-21 03:24:41 +04:00
|
|
|
|
2014-06-11 09:44:36 +04:00
|
|
|
public:
|
2016-01-05 12:59:30 +03:00
|
|
|
/**
|
|
|
|
* Find TabChild of aTabId in the same content process of the
|
|
|
|
* caller.
|
|
|
|
*/
|
|
|
|
static already_AddRefed<TabChild> FindTabChild(const TabId& aTabId);
|
2014-06-11 09:44:36 +04:00
|
|
|
|
2016-09-20 11:19:32 +03:00
|
|
|
// Return a list of all active TabChildren.
|
|
|
|
static nsTArray<RefPtr<TabChild>> GetAll();
|
|
|
|
|
2009-07-01 00:39:22 +04:00
|
|
|
public:
|
2016-01-05 12:59:30 +03:00
|
|
|
/**
|
|
|
|
* Create a new TabChild object.
|
|
|
|
*/
|
|
|
|
TabChild(nsIContentChild* aManager,
|
|
|
|
const TabId& aTabId,
|
2017-04-07 02:46:18 +03:00
|
|
|
TabGroup* aTabGroup,
|
2016-01-05 12:59:30 +03:00
|
|
|
const TabContext& aContext,
|
|
|
|
uint32_t aChromeFlags);
|
|
|
|
|
|
|
|
nsresult Init();
|
|
|
|
|
|
|
|
/** Return a TabChild with the given attributes. */
|
|
|
|
static already_AddRefed<TabChild>
|
|
|
|
Create(nsIContentChild* aManager, const TabId& aTabId,
|
2017-04-07 02:46:18 +03:00
|
|
|
const TabId& aSameTabGroupAs,
|
2016-01-05 12:59:30 +03:00
|
|
|
const TabContext& aContext, uint32_t aChromeFlags);
|
|
|
|
|
|
|
|
// Let managees query if it is safe to send messages.
|
|
|
|
bool IsDestroyed() const{ return mDestroyed; }
|
|
|
|
|
|
|
|
const TabId GetTabId() const
|
|
|
|
{
|
|
|
|
MOZ_ASSERT(mUniqueId != 0);
|
|
|
|
return mUniqueId;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
NS_DECL_NSIWEBBROWSERCHROME
|
|
|
|
NS_DECL_NSIWEBBROWSERCHROME2
|
|
|
|
NS_DECL_NSIEMBEDDINGSITEWINDOW
|
|
|
|
NS_DECL_NSIWEBBROWSERCHROMEFOCUS
|
|
|
|
NS_DECL_NSIINTERFACEREQUESTOR
|
|
|
|
NS_DECL_NSIWINDOWPROVIDER
|
|
|
|
NS_DECL_NSITABCHILD
|
|
|
|
NS_DECL_NSIOBSERVER
|
|
|
|
NS_DECL_NSITOOLTIPLISTENER
|
|
|
|
|
2017-10-02 17:58:52 +03:00
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(TabChild, TabChildBase)
|
|
|
|
|
2016-06-15 15:49:13 +03:00
|
|
|
FORWARD_SHMEM_ALLOCATOR_TO(PBrowserChild)
|
|
|
|
|
2018-02-16 17:28:31 +03:00
|
|
|
TabChildGlobal* GetMessageManager()
|
2018-03-01 22:19:56 +03:00
|
|
|
{
|
|
|
|
return mTabChildGlobal;
|
|
|
|
}
|
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
/**
|
|
|
|
* MessageManagerCallback methods that we override.
|
|
|
|
*/
|
|
|
|
virtual bool DoSendBlockingMessage(JSContext* aCx,
|
|
|
|
const nsAString& aMessage,
|
|
|
|
StructuredCloneData& aData,
|
|
|
|
JS::Handle<JSObject *> aCpows,
|
|
|
|
nsIPrincipal* aPrincipal,
|
|
|
|
nsTArray<StructuredCloneData>* aRetVal,
|
|
|
|
bool aIsSync) override;
|
|
|
|
|
|
|
|
virtual nsresult DoSendAsyncMessage(JSContext* aCx,
|
|
|
|
const nsAString& aMessage,
|
|
|
|
StructuredCloneData& aData,
|
|
|
|
JS::Handle<JSObject *> aCpows,
|
|
|
|
nsIPrincipal* aPrincipal) override;
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
DoUpdateZoomConstraints(const uint32_t& aPresShellId,
|
|
|
|
const ViewID& aViewId,
|
|
|
|
const Maybe<ZoomConstraints>& aConstraints) override;
|
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvLoadURL(const nsCString& aURI,
|
|
|
|
const ShowInfo& aInfo) override;
|
|
|
|
virtual mozilla::ipc::IPCResult
|
2016-01-05 12:59:30 +03:00
|
|
|
RecvShow(const ScreenIntSize& aSize,
|
|
|
|
const ShowInfo& aInfo,
|
2016-02-23 19:10:00 +03:00
|
|
|
const bool& aParentIsActive,
|
|
|
|
const nsSizeMode& aSizeMode) override;
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2017-01-17 23:52:45 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
|
|
|
RecvInitRendering(const TextureFactoryIdentifier& aTextureFactoryIdentifier,
|
2018-03-25 02:06:01 +03:00
|
|
|
const layers::LayersId& aLayersId,
|
2017-04-10 00:30:27 +03:00
|
|
|
const mozilla::layers::CompositorOptions& aCompositorOptions,
|
2017-03-31 18:43:21 +03:00
|
|
|
const bool& aLayersConnected,
|
2017-01-17 23:52:45 +03:00
|
|
|
PRenderFrameChild* aRenderFrame) override;
|
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
2017-06-07 21:36:46 +03:00
|
|
|
RecvUpdateDimensions(const mozilla::dom::DimensionInfo& aDimensionInfo) override;
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
2016-02-23 19:10:00 +03:00
|
|
|
RecvSizeModeChanged(const nsSizeMode& aSizeMode) override;
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2017-01-21 07:11:35 +03:00
|
|
|
mozilla::ipc::IPCResult RecvActivate();
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2017-01-21 07:11:35 +03:00
|
|
|
mozilla::ipc::IPCResult RecvDeactivate();
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2018-01-29 22:35:17 +03:00
|
|
|
MOZ_CAN_RUN_SCRIPT
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvMouseEvent(const nsString& aType,
|
|
|
|
const float& aX,
|
|
|
|
const float& aY,
|
|
|
|
const int32_t& aButton,
|
|
|
|
const int32_t& aClickCount,
|
|
|
|
const int32_t& aModifiers,
|
|
|
|
const bool& aIgnoreRootScrollFrame) override;
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvRealMouseMoveEvent(const mozilla::WidgetMouseEvent& aEvent,
|
|
|
|
const ScrollableLayerGuid& aGuid,
|
|
|
|
const uint64_t& aInputBlockId) override;
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2017-07-28 10:14:54 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
|
|
|
RecvNormalPriorityRealMouseMoveEvent(const mozilla::WidgetMouseEvent& aEvent,
|
|
|
|
const ScrollableLayerGuid& aGuid,
|
|
|
|
const uint64_t& aInputBlockId) override;
|
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvSynthMouseMoveEvent(const mozilla::WidgetMouseEvent& aEvent,
|
|
|
|
const ScrollableLayerGuid& aGuid,
|
|
|
|
const uint64_t& aInputBlockId) override;
|
2017-07-28 10:14:54 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
|
|
|
RecvNormalPrioritySynthMouseMoveEvent(const mozilla::WidgetMouseEvent& aEvent,
|
|
|
|
const ScrollableLayerGuid& aGuid,
|
|
|
|
const uint64_t& aInputBlockId) override;
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvRealMouseButtonEvent(const mozilla::WidgetMouseEvent& aEvent,
|
|
|
|
const ScrollableLayerGuid& aGuid,
|
|
|
|
const uint64_t& aInputBlockId) override;
|
2017-07-28 10:14:54 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
|
|
|
RecvNormalPriorityRealMouseButtonEvent(const mozilla::WidgetMouseEvent& aEvent,
|
|
|
|
const ScrollableLayerGuid& aGuid,
|
|
|
|
const uint64_t& aInputBlockId) override;
|
2014-09-27 03:21:57 +04:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvRealDragEvent(const WidgetDragEvent& aEvent,
|
|
|
|
const uint32_t& aDragAction,
|
2018-02-09 04:43:53 +03:00
|
|
|
const uint32_t& aDropEffect,
|
|
|
|
const nsCString& aPrincipalURISpec) override;
|
2009-11-06 23:43:39 +03:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
2017-05-19 11:24:20 +03:00
|
|
|
RecvRealKeyEvent(const mozilla::WidgetKeyboardEvent& aEvent) override;
|
2012-08-29 19:26:18 +04:00
|
|
|
|
2017-07-28 10:14:54 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
|
|
|
RecvNormalPriorityRealKeyEvent(const mozilla::WidgetKeyboardEvent& aEvent) override;
|
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvMouseWheelEvent(const mozilla::WidgetWheelEvent& aEvent,
|
|
|
|
const ScrollableLayerGuid& aGuid,
|
|
|
|
const uint64_t& aInputBlockId) override;
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2017-07-28 10:14:54 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
|
|
|
RecvNormalPriorityMouseWheelEvent(const mozilla::WidgetWheelEvent& aEvent,
|
|
|
|
const ScrollableLayerGuid& aGuid,
|
|
|
|
const uint64_t& aInputBlockId) override;
|
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvRealTouchEvent(const WidgetTouchEvent& aEvent,
|
|
|
|
const ScrollableLayerGuid& aGuid,
|
|
|
|
const uint64_t& aInputBlockId,
|
|
|
|
const nsEventStatus& aApzResponse) override;
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2017-07-28 10:14:54 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
|
|
|
RecvNormalPriorityRealTouchEvent(const WidgetTouchEvent& aEvent,
|
|
|
|
const ScrollableLayerGuid& aGuid,
|
|
|
|
const uint64_t& aInputBlockId,
|
|
|
|
const nsEventStatus& aApzResponse) override;
|
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
2016-01-05 12:59:30 +03:00
|
|
|
RecvRealTouchMoveEvent(const WidgetTouchEvent& aEvent,
|
|
|
|
const ScrollableLayerGuid& aGuid,
|
|
|
|
const uint64_t& aInputBlockId,
|
|
|
|
const nsEventStatus& aApzResponse) override;
|
|
|
|
|
2017-07-28 10:14:54 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
|
|
|
RecvNormalPriorityRealTouchMoveEvent(const WidgetTouchEvent& aEvent,
|
|
|
|
const ScrollableLayerGuid& aGuid,
|
|
|
|
const uint64_t& aInputBlockId,
|
|
|
|
const nsEventStatus& aApzResponse) override;
|
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvNativeSynthesisResponse(const uint64_t& aObserverId,
|
|
|
|
const nsCString& aResponse) override;
|
2012-11-22 06:40:57 +04:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvPluginEvent(const WidgetPluginEvent& aEvent) override;
|
2012-07-18 03:59:45 +04:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
2016-01-05 12:59:30 +03:00
|
|
|
RecvCompositionEvent(const mozilla::WidgetCompositionEvent& aEvent) override;
|
2012-07-20 10:48:27 +04:00
|
|
|
|
2017-09-29 16:03:25 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
|
|
|
RecvNormalPriorityCompositionEvent(
|
|
|
|
const mozilla::WidgetCompositionEvent& aEvent) override;
|
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
2016-01-05 12:59:30 +03:00
|
|
|
RecvSelectionEvent(const mozilla::WidgetSelectionEvent& aEvent) override;
|
2017-09-29 16:03:25 +03:00
|
|
|
|
|
|
|
virtual mozilla::ipc::IPCResult
|
|
|
|
RecvNormalPrioritySelectionEvent(
|
|
|
|
const mozilla::WidgetSelectionEvent& aEvent) override;
|
2012-07-20 10:48:27 +04:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
2016-08-31 04:30:45 +03:00
|
|
|
RecvPasteTransferable(const IPCDataTransfer& aDataTransfer,
|
|
|
|
const bool& aIsPrivateData,
|
2018-03-14 11:44:36 +03:00
|
|
|
const IPC::Principal& aRequestingPrincipal,
|
|
|
|
const uint32_t& aContentPolicyType) override;
|
2016-08-31 04:30:45 +03:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
2016-01-05 12:59:30 +03:00
|
|
|
RecvActivateFrameEvent(const nsString& aType, const bool& aCapture) override;
|
2012-11-08 07:51:55 +04:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvLoadRemoteScript(const nsString& aURL,
|
|
|
|
const bool& aRunInGlobalScope) override;
|
2013-02-16 02:27:21 +04:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvAsyncMessage(const nsString& aMessage,
|
|
|
|
InfallibleTArray<CpowEntry>&& aCpows,
|
|
|
|
const IPC::Principal& aPrincipal,
|
|
|
|
const ClonedMessageData& aData) override;
|
|
|
|
virtual mozilla::ipc::IPCResult
|
2016-04-29 01:04:52 +03:00
|
|
|
RecvSwappedWithOtherRemoteLoader(const IPCTabContext& aContext) override;
|
2013-08-13 11:56:57 +04:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
virtual PDocAccessibleChild*
|
2016-10-27 22:16:24 +03:00
|
|
|
AllocPDocAccessibleChild(PDocAccessibleChild*, const uint64_t&,
|
2016-12-02 02:28:54 +03:00
|
|
|
const uint32_t&, const IAccessibleHolder&) override;
|
2013-08-13 11:56:57 +04:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
virtual bool DeallocPDocAccessibleChild(PDocAccessibleChild*) override;
|
2013-09-12 23:24:11 +04:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
virtual PColorPickerChild*
|
|
|
|
AllocPColorPickerChild(const nsString& aTitle,
|
|
|
|
const nsString& aInitialColor) override;
|
2013-09-12 23:24:11 +04:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
virtual bool DeallocPColorPickerChild(PColorPickerChild* aActor) override;
|
2014-05-23 18:36:50 +04:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
virtual PFilePickerChild*
|
|
|
|
AllocPFilePickerChild(const nsString& aTitle, const int16_t& aMode) override;
|
2015-04-22 17:58:33 +03:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
virtual bool
|
|
|
|
DeallocPFilePickerChild(PFilePickerChild* aActor) override;
|
2015-09-18 15:19:13 +03:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
virtual PIndexedDBPermissionRequestChild*
|
|
|
|
AllocPIndexedDBPermissionRequestChild(const Principal& aPrincipal) override;
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
DeallocPIndexedDBPermissionRequestChild(PIndexedDBPermissionRequestChild* aActor) override;
|
|
|
|
|
|
|
|
virtual nsIWebNavigation* WebNavigation() const override
|
|
|
|
{
|
|
|
|
return mWebNav;
|
|
|
|
}
|
2015-12-11 19:17:33 +03:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
virtual PuppetWidget* WebWidget() override { return mPuppetWidget; }
|
2014-11-12 23:59:19 +03:00
|
|
|
|
2016-05-16 05:56:09 +03:00
|
|
|
bool IsTransparent() const { return mIsTransparent; }
|
|
|
|
|
2017-03-15 02:48:41 +03:00
|
|
|
void GetMaxTouchPoints(uint32_t* aTouchPoints)
|
|
|
|
{
|
|
|
|
*aTouchPoints = mMaxTouchPoints;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetMaxTouchPoints(uint32_t aMaxTouchPoints)
|
|
|
|
{
|
|
|
|
mMaxTouchPoints = aMaxTouchPoints;
|
|
|
|
}
|
2015-02-06 19:26:29 +03:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
ScreenOrientationInternal GetOrientation() const { return mOrientation; }
|
2015-06-08 08:39:28 +03:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
void SetBackgroundColor(const nscolor& aColor);
|
|
|
|
|
|
|
|
void NotifyPainted();
|
|
|
|
|
2017-05-19 12:46:02 +03:00
|
|
|
void RequestEditCommands(nsIWidget::NativeKeyBindingsType aType,
|
|
|
|
const WidgetKeyboardEvent& aEvent,
|
|
|
|
nsTArray<CommandInt>& aCommands);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Signal to this TabChild that it should be made visible:
|
|
|
|
* activated widget, retained layer tree, etc. (Respectively,
|
|
|
|
* made not visible.)
|
|
|
|
*/
|
|
|
|
void MakeVisible();
|
|
|
|
void MakeHidden();
|
2017-11-03 17:27:05 +03:00
|
|
|
bool IsVisible();
|
2016-01-05 12:59:30 +03:00
|
|
|
|
|
|
|
nsIContentChild* Manager() const { return mManager; }
|
|
|
|
|
|
|
|
static inline TabChild*
|
|
|
|
GetFrom(nsIDocShell* aDocShell)
|
|
|
|
{
|
2016-03-16 22:18:38 +03:00
|
|
|
if (!aDocShell) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsCOMPtr<nsITabChild> tc = aDocShell->GetTabChild();
|
2016-01-05 12:59:30 +03:00
|
|
|
return static_cast<TabChild*>(tc.get());
|
|
|
|
}
|
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
static inline TabChild*
|
|
|
|
GetFrom(mozIDOMWindow* aWindow)
|
|
|
|
{
|
|
|
|
nsCOMPtr<nsIWebNavigation> webNav = do_GetInterface(aWindow);
|
|
|
|
nsCOMPtr<nsIDocShell> docShell = do_QueryInterface(webNav);
|
|
|
|
return GetFrom(docShell);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline TabChild*
|
|
|
|
GetFrom(mozIDOMWindowProxy* aWindow)
|
|
|
|
{
|
|
|
|
nsCOMPtr<nsIWebNavigation> webNav = do_GetInterface(aWindow);
|
|
|
|
nsCOMPtr<nsIDocShell> docShell = do_QueryInterface(webNav);
|
|
|
|
return GetFrom(docShell);
|
|
|
|
}
|
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
static TabChild* GetFrom(nsIPresShell* aPresShell);
|
2018-03-25 02:06:01 +03:00
|
|
|
static TabChild* GetFrom(layers::LayersId aLayersId);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2018-03-25 02:06:01 +03:00
|
|
|
layers::LayersId GetLayersId() { return mLayersId; }
|
2017-10-13 17:32:36 +03:00
|
|
|
Maybe<bool> IsLayersConnected() { return mLayersConnected; }
|
2016-03-19 04:38:57 +03:00
|
|
|
|
2018-04-20 22:13:06 +03:00
|
|
|
void DidComposite(mozilla::layers::TransactionId aTransactionId,
|
2016-01-05 12:59:30 +03:00
|
|
|
const TimeStamp& aCompositeStart,
|
|
|
|
const TimeStamp& aCompositeEnd);
|
|
|
|
|
|
|
|
void DidRequestComposite(const TimeStamp& aCompositeReqStart,
|
|
|
|
const TimeStamp& aCompositeReqEnd);
|
|
|
|
|
|
|
|
void ClearCachedResources();
|
2016-02-29 09:53:12 +03:00
|
|
|
void InvalidateLayers();
|
2016-09-20 11:19:32 +03:00
|
|
|
void ReinitRendering();
|
2017-05-12 08:44:27 +03:00
|
|
|
void ReinitRenderingForDeviceReset();
|
2016-01-05 12:59:30 +03:00
|
|
|
|
|
|
|
static inline TabChild* GetFrom(nsIDOMWindow* aWindow)
|
|
|
|
{
|
|
|
|
nsCOMPtr<nsIWebNavigation> webNav = do_GetInterface(aWindow);
|
|
|
|
nsCOMPtr<nsIDocShell> docShell = do_QueryInterface(webNav);
|
|
|
|
return GetFrom(docShell);
|
|
|
|
}
|
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvUIResolutionChanged(const float& aDpi,
|
|
|
|
const int32_t& aRounding,
|
|
|
|
const double& aScale) override;
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
2016-01-05 12:59:30 +03:00
|
|
|
RecvThemeChanged(nsTArray<LookAndFeelInt>&& aLookAndFeelIntCache) override;
|
|
|
|
|
2017-07-06 11:36:19 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
|
|
|
RecvHandleAccessKey(const WidgetKeyboardEvent& aEvent,
|
|
|
|
nsTArray<uint32_t>&& aCharCodes) override;
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvSetUseGlobalHistory(const bool& aUse) override;
|
2016-03-23 21:39:28 +03:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvHandledWindowedPluginKeyEvent(
|
|
|
|
const mozilla::NativeEventData& aKeyEventData,
|
|
|
|
const bool& aIsConsumed) override;
|
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
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvPrint(const uint64_t& aOuterWindowID,
|
|
|
|
const PrintData& aPrintData) override;
|
2016-05-16 12:40:54 +03:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvUpdateNativeWindowHandle(const uintptr_t& aNewHandle) override;
|
2016-09-15 22:37:04 +03:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
/**
|
|
|
|
* Native widget remoting protocol for use with windowed plugins with e10s.
|
|
|
|
*/
|
|
|
|
PPluginWidgetChild* AllocPPluginWidgetChild() override;
|
|
|
|
|
|
|
|
bool DeallocPPluginWidgetChild(PPluginWidgetChild* aActor) override;
|
|
|
|
|
2017-02-09 19:53:50 +03:00
|
|
|
#ifdef XP_WIN
|
2016-01-05 12:59:30 +03:00
|
|
|
nsresult CreatePluginWidget(nsIWidget* aParent, nsIWidget** aOut);
|
2017-02-09 19:53:50 +03:00
|
|
|
#endif
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2017-05-25 20:50:32 +03:00
|
|
|
virtual PPaymentRequestChild*
|
|
|
|
AllocPPaymentRequestChild() override;
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
DeallocPPaymentRequestChild(PPaymentRequestChild* aActor) override;
|
|
|
|
|
2016-03-08 22:14:43 +03:00
|
|
|
LayoutDeviceIntPoint GetClientOffset() const { return mClientOffset; }
|
2017-11-22 22:21:37 +03:00
|
|
|
LayoutDeviceIntPoint GetChromeOffset() const { return mChromeOffset; };
|
2016-01-05 12:59:30 +03:00
|
|
|
|
|
|
|
bool IPCOpen() const { return mIPCOpen; }
|
|
|
|
|
|
|
|
bool ParentIsActive() const
|
|
|
|
{
|
|
|
|
return mParentIsActive;
|
|
|
|
}
|
|
|
|
|
2017-11-03 10:38:34 +03:00
|
|
|
const mozilla::layers::CompositorOptions& GetCompositorOptions() const;
|
2017-01-13 01:29:41 +03:00
|
|
|
bool AsyncPanZoomEnabled() const;
|
2016-01-05 12:59:30 +03:00
|
|
|
|
|
|
|
virtual ScreenIntSize GetInnerSize() override;
|
|
|
|
|
|
|
|
// Call RecvShow(nsIntSize(0, 0)) and block future calls to RecvShow().
|
|
|
|
void DoFakeShow(const TextureFactoryIdentifier& aTextureFactoryIdentifier,
|
2018-03-25 02:06:01 +03:00
|
|
|
const layers::LayersId& aLayersId,
|
2017-04-10 00:30:27 +03:00
|
|
|
const mozilla::layers::CompositorOptions& aCompositorOptions,
|
2016-01-05 12:59:30 +03:00
|
|
|
PRenderFrameChild* aRenderFrame,
|
|
|
|
const ShowInfo& aShowInfo);
|
2015-10-30 02:30:57 +03:00
|
|
|
|
2016-01-08 22:17:39 +03:00
|
|
|
void ContentReceivedInputBlock(const ScrollableLayerGuid& aGuid,
|
|
|
|
uint64_t aInputBlockId,
|
|
|
|
bool aPreventDefault) const;
|
|
|
|
void SetTargetAPZC(uint64_t aInputBlockId,
|
|
|
|
const nsTArray<ScrollableLayerGuid>& aTargets) const;
|
2018-01-29 22:35:17 +03:00
|
|
|
MOZ_CAN_RUN_SCRIPT
|
2016-11-15 06:26:00 +03:00
|
|
|
mozilla::ipc::IPCResult RecvHandleTap(const layers::GeckoContentController::TapType& aType,
|
|
|
|
const LayoutDevicePoint& aPoint,
|
|
|
|
const Modifiers& aModifiers,
|
|
|
|
const ScrollableLayerGuid& aGuid,
|
|
|
|
const uint64_t& aInputBlockId) override;
|
2017-07-28 10:14:54 +03:00
|
|
|
|
2018-01-29 22:35:17 +03:00
|
|
|
MOZ_CAN_RUN_SCRIPT
|
2017-07-28 10:14:54 +03:00
|
|
|
mozilla::ipc::IPCResult
|
|
|
|
RecvNormalPriorityHandleTap(const layers::GeckoContentController::TapType& aType,
|
|
|
|
const LayoutDevicePoint& aPoint,
|
|
|
|
const Modifiers& aModifiers,
|
|
|
|
const ScrollableLayerGuid& aGuid,
|
|
|
|
const uint64_t& aInputBlockId) override;
|
|
|
|
|
2016-01-08 22:17:39 +03:00
|
|
|
void SetAllowedTouchBehavior(uint64_t aInputBlockId,
|
|
|
|
const nsTArray<TouchBehaviorFlags>& aFlags) const;
|
|
|
|
|
|
|
|
bool UpdateFrame(const FrameMetrics& aFrameMetrics);
|
|
|
|
bool NotifyAPZStateChange(const ViewID& aViewId,
|
|
|
|
const layers::GeckoContentController::APZStateChange& aChange,
|
|
|
|
const int& aArg);
|
|
|
|
void StartScrollbarDrag(const layers::AsyncDragMetrics& aDragMetrics);
|
|
|
|
void ZoomToRect(const uint32_t& aPresShellId,
|
|
|
|
const FrameMetrics::ViewID& aViewId,
|
|
|
|
const CSSRect& aRect,
|
|
|
|
const uint32_t& aFlags);
|
|
|
|
|
2016-07-23 02:36:45 +03:00
|
|
|
// Request that the docshell be marked as active.
|
|
|
|
void ForcePaint(uint64_t aLayerObserverEpoch);
|
|
|
|
|
2016-09-15 22:37:04 +03:00
|
|
|
#if defined(XP_WIN) && defined(ACCESSIBILITY)
|
|
|
|
uintptr_t GetNativeWindowHandle() const { return mNativeWindowHandle; }
|
|
|
|
#endif
|
|
|
|
|
2017-01-26 22:20:44 +03:00
|
|
|
// These methods return `true` if this TabChild is currently awaiting a
|
|
|
|
// Large-Allocation header.
|
2017-02-10 01:49:46 +03:00
|
|
|
bool StopAwaitingLargeAlloc();
|
2017-01-26 22:20:44 +03:00
|
|
|
bool IsAwaitingLargeAlloc();
|
2016-11-04 21:13:52 +03:00
|
|
|
|
2017-01-26 22:20:44 +03:00
|
|
|
mozilla::dom::TabGroup* TabGroup();
|
|
|
|
|
2017-05-02 00:04:55 +03:00
|
|
|
#if defined(ACCESSIBILITY)
|
|
|
|
void SetTopLevelDocAccessibleChild(PDocAccessibleChild* aTopLevelChild)
|
|
|
|
{
|
|
|
|
mTopLevelDocAccessibleChild = aTopLevelChild;
|
|
|
|
}
|
|
|
|
|
|
|
|
PDocAccessibleChild* GetTopLevelDocAccessibleChild()
|
|
|
|
{
|
|
|
|
return mTopLevelDocAccessibleChild;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-06-15 20:23:55 +03:00
|
|
|
void AddPendingDocShellBlocker();
|
|
|
|
void RemovePendingDocShellBlocker();
|
|
|
|
|
2017-06-13 20:37:31 +03:00
|
|
|
// The HANDLE object for the widget this TabChild in.
|
|
|
|
WindowsHandle WidgetNativeData()
|
|
|
|
{
|
|
|
|
return mWidgetNativeData;
|
|
|
|
}
|
|
|
|
|
2017-10-12 04:05:40 +03:00
|
|
|
// Prepare to dispatch all coalesced mousemove events. We'll move all data
|
|
|
|
// in mCoalescedMouseData to a nsDeque; then we start processing them. We
|
|
|
|
// can't fetch the coalesced event one by one and dispatch it because we may
|
|
|
|
// reentry the event loop and access to the same hashtable. It's called when
|
|
|
|
// dispatching some mouse events other than mousemove.
|
|
|
|
void FlushAllCoalescedMouseData();
|
|
|
|
void ProcessPendingCoalescedMouseDataAndDispatchEvents();
|
2017-07-20 02:10:48 +03:00
|
|
|
|
2017-10-12 04:05:40 +03:00
|
|
|
void HandleRealMouseButtonEvent(const WidgetMouseEvent& aEvent,
|
|
|
|
const ScrollableLayerGuid& aGuid,
|
|
|
|
const uint64_t& aInputBlockId);
|
2017-08-11 09:58:08 +03:00
|
|
|
|
2017-11-03 18:27:29 +03:00
|
|
|
static bool HasVisibleTabs()
|
2017-07-20 02:10:48 +03:00
|
|
|
{
|
2017-11-03 18:27:29 +03:00
|
|
|
return sVisibleTabs && !sVisibleTabs->IsEmpty();
|
2017-07-20 02:10:48 +03:00
|
|
|
}
|
|
|
|
|
2017-11-03 18:27:29 +03:00
|
|
|
// Returns the set of TabChilds that are currently rendering layers. There
|
|
|
|
// can be multiple TabChilds in this state if Firefox has multiple windows
|
|
|
|
// open or is warming tabs up. There can also be zero TabChilds in this
|
|
|
|
// state. Note that this function should only be called if HasVisibleTabs()
|
|
|
|
// returns true.
|
|
|
|
static const nsTHashtable<nsPtrHashKey<TabChild>>& GetVisibleTabs()
|
2017-07-20 02:10:48 +03:00
|
|
|
{
|
2017-11-03 18:27:29 +03:00
|
|
|
MOZ_ASSERT(HasVisibleTabs());
|
|
|
|
return *sVisibleTabs;
|
2017-07-20 02:10:48 +03:00
|
|
|
}
|
|
|
|
|
2010-08-06 02:11:23 +04:00
|
|
|
protected:
|
2016-01-05 12:59:30 +03:00
|
|
|
virtual ~TabChild();
|
|
|
|
|
|
|
|
virtual PRenderFrameChild* AllocPRenderFrameChild() override;
|
|
|
|
|
|
|
|
virtual bool DeallocPRenderFrameChild(PRenderFrameChild* aFrame) override;
|
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvDestroy() override;
|
2014-07-09 01:23:17 +04:00
|
|
|
|
2017-11-03 17:27:05 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvSetDocShellIsActive(const bool& aIsActive) override;
|
|
|
|
|
|
|
|
virtual mozilla::ipc::IPCResult RecvRenderLayers(const bool& aEnabled, const uint64_t& aLayerObserverEpoch) override;
|
2014-05-23 22:19:00 +04:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvNavigateByKey(const bool& aForward,
|
|
|
|
const bool& aForDocumentNavigation) override;
|
2015-08-20 00:08:41 +03:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvRequestNotifyAfterRemotePaint() override;
|
2014-11-27 16:28:26 +03:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvSuppressDisplayport(const bool& aEnabled) override;
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2017-08-23 12:02:57 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvParentActivated(const bool& aActivated) override;
|
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvSetKeyboardIndicators(const UIStateChangeType& aShowAccelerators,
|
|
|
|
const UIStateChangeType& aShowFocusRings) override;
|
2016-06-09 14:59:31 +03:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvStopIMEStateManagement() override;
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2017-02-10 01:49:46 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvAwaitLargeAlloc() override;
|
2016-10-21 23:56:51 +03:00
|
|
|
|
2017-06-05 20:33:11 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvSetWindowName(const nsString& aName) override;
|
|
|
|
|
2017-06-06 21:22:17 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvSetOriginAttributes(const OriginAttributes& aOriginAttributes) override;
|
|
|
|
|
2017-06-13 20:37:31 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvSetWidgetNativeData(const WindowsHandle& aWidgetNativeData) override;
|
|
|
|
|
2009-07-01 00:39:22 +04:00
|
|
|
private:
|
2016-07-05 20:24:54 +03:00
|
|
|
void HandleDoubleTap(const CSSPoint& aPoint, const Modifiers& aModifiers,
|
|
|
|
const ScrollableLayerGuid& aGuid);
|
|
|
|
|
2016-09-05 15:43:51 +03:00
|
|
|
// Notify others that our TabContext has been updated.
|
2016-01-05 12:59:30 +03:00
|
|
|
//
|
|
|
|
// You should call this after calling TabContext::SetTabContext(). We also
|
|
|
|
// call this during Init().
|
2016-09-05 15:43:51 +03:00
|
|
|
//
|
|
|
|
// @param aIsPreallocated true if this is called for Preallocated Tab.
|
|
|
|
void NotifyTabContextUpdated(bool aIsPreallocated);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2016-05-16 06:07:09 +03:00
|
|
|
// Update the frameType on our docshell.
|
|
|
|
void UpdateFrameType();
|
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
void ActorDestroy(ActorDestroyReason why) override;
|
|
|
|
|
2016-10-19 04:54:12 +03:00
|
|
|
bool InitTabChildGlobal();
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2016-11-15 01:58:22 +03:00
|
|
|
void InitRenderingState(const TextureFactoryIdentifier& aTextureFactoryIdentifier,
|
2018-03-25 02:06:01 +03:00
|
|
|
const layers::LayersId& aLayersId,
|
2017-04-10 00:30:27 +03:00
|
|
|
const mozilla::layers::CompositorOptions& aCompositorOptions,
|
2016-01-05 12:59:30 +03:00
|
|
|
PRenderFrameChild* aRenderFrame);
|
2016-11-29 07:21:27 +03:00
|
|
|
void InitAPZState();
|
2016-01-05 12:59:30 +03:00
|
|
|
|
|
|
|
void DestroyWindow();
|
|
|
|
|
|
|
|
void ApplyShowInfo(const ShowInfo& aInfo);
|
|
|
|
|
|
|
|
bool HasValidInnerSize();
|
|
|
|
|
|
|
|
void SetTabId(const TabId& aTabId);
|
|
|
|
|
|
|
|
ScreenIntRect GetOuterRect();
|
|
|
|
|
|
|
|
void SetUnscaledInnerSize(const CSSSize& aSize)
|
|
|
|
{
|
|
|
|
mUnscaledInnerSize = aSize;
|
|
|
|
}
|
|
|
|
|
2017-01-16 12:29:37 +03:00
|
|
|
bool SkipRepeatedKeyEvent(const WidgetKeyboardEvent& aEvent);
|
|
|
|
|
|
|
|
void UpdateRepeatedKeyEventEndTime(const WidgetKeyboardEvent& aEvent);
|
|
|
|
|
2017-02-21 12:56:46 +03:00
|
|
|
bool MaybeCoalesceWheelEvent(const WidgetWheelEvent& aEvent,
|
|
|
|
const ScrollableLayerGuid& aGuid,
|
|
|
|
const uint64_t& aInputBlockId,
|
|
|
|
bool* aIsNextWheelEvent);
|
|
|
|
|
|
|
|
void MaybeDispatchCoalescedWheelEvent();
|
|
|
|
|
Bug 1333459 - part2-2: EventStateManager should check if it needs to wait reply from remote content before handling access keys r=smaug
Currently, access key is handled in EventStateManager::PreHandleEvent() with eKeyPress event, i.e., before dispatching it into the DOM tree, if the access key is registered in EventStateManager. So, the main process does not check if the preceding eKeyDown event is consumed in focused remote process.
When preceding eKeyDown event is consumed in the main process, eKeyPress event won't be dispatched by widget. However, if remote process has focus, it's impossible widget to stop dispatching eKeyPress event because preceding eKeyDown event hasn't been handled in the focused remote process yet. Therefore, main process needs to post eKeyPress event to check if preceding eKeyDown event was consumed. When eKeyPress event is marked as "waiting reply from remote process", TabChild sends it back to the main process only when preceding eKeyDown event wasn't consumed. So, only when eKeyPress event is back to the main process, main process should handle accesskey with it.
This patch makes EventStateManager::PreHandleEvent() check if a remote target has focus before handling accesskey. If a remote process has accesskey and there is an accesskey matching with eKeyPress event, it marks the event as "waiting reply from remote content" and stop propagation in the process.
Finally, when eKeyPress event is sent back to TabParent, TabParent::RecvReplyKeyEvent() calls EventStateManager::HandleAccessKey() before dispatching the reply event into the DOM tree.
MozReview-Commit-ID: KsOkakaIVzb
--HG--
extra : rebase_source : 7e0c6966a1bde085e34d45bca4b0166b9fc2f3f1
2017-07-22 04:50:41 +03:00
|
|
|
/**
|
|
|
|
* Dispatch aEvent on aEvent.mWidget.
|
|
|
|
*/
|
|
|
|
nsEventStatus DispatchWidgetEventViaAPZ(WidgetGUIEvent& aEvent);
|
|
|
|
|
2017-02-21 12:56:46 +03:00
|
|
|
void DispatchWheelEvent(const WidgetWheelEvent& aEvent,
|
|
|
|
const ScrollableLayerGuid& aGuid,
|
|
|
|
const uint64_t& aInputBlockId);
|
|
|
|
|
2017-11-03 17:27:05 +03:00
|
|
|
void InternalSetDocShellIsActive(bool aIsActive);
|
2017-06-15 20:23:55 +03:00
|
|
|
|
2017-10-13 17:32:52 +03:00
|
|
|
bool CreateRemoteLayerManager(mozilla::layers::PCompositorBridgeChild* aCompositorChild);
|
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
class DelayedDeleteRunnable;
|
|
|
|
|
|
|
|
TextureFactoryIdentifier mTextureFactoryIdentifier;
|
|
|
|
nsCOMPtr<nsIWebNavigation> mWebNav;
|
2017-04-10 23:42:36 +03:00
|
|
|
RefPtr<mozilla::dom::TabGroup> mTabGroup;
|
2016-01-05 12:59:30 +03:00
|
|
|
RefPtr<PuppetWidget> mPuppetWidget;
|
|
|
|
nsCOMPtr<nsIURI> mLastURI;
|
|
|
|
RenderFrameChild* mRemoteFrame;
|
|
|
|
RefPtr<nsIContentChild> mManager;
|
|
|
|
uint32_t mChromeFlags;
|
2017-03-15 02:48:41 +03:00
|
|
|
uint32_t mMaxTouchPoints;
|
2016-01-05 12:59:30 +03:00
|
|
|
int32_t mActiveSuppressDisplayport;
|
2018-03-25 02:06:01 +03:00
|
|
|
layers::LayersId mLayersId;
|
2017-04-14 00:54:07 +03:00
|
|
|
int64_t mBeforeUnloadListeners;
|
2016-01-05 12:59:30 +03:00
|
|
|
CSSRect mUnscaledOuterRect;
|
|
|
|
nscolor mLastBackgroundColor;
|
2017-10-13 17:32:36 +03:00
|
|
|
Maybe<bool> mLayersConnected;
|
2016-01-05 12:59:30 +03:00
|
|
|
bool mDidFakeShow;
|
|
|
|
bool mNotified;
|
|
|
|
bool mTriedBrowserInit;
|
|
|
|
ScreenOrientationInternal mOrientation;
|
|
|
|
|
|
|
|
bool mIgnoreKeyPressEvent;
|
|
|
|
RefPtr<APZEventState> mAPZEventState;
|
|
|
|
SetAllowedTouchBehaviorCallback mSetAllowedTouchBehaviorCallback;
|
|
|
|
bool mHasValidInnerSize;
|
|
|
|
bool mDestroyed;
|
2016-03-08 22:14:43 +03:00
|
|
|
// Position of client area relative to the outer window
|
|
|
|
LayoutDeviceIntPoint mClientOffset;
|
2016-01-05 12:59:30 +03:00
|
|
|
// Position of tab, relative to parent widget (typically the window)
|
2017-11-22 22:21:37 +03:00
|
|
|
LayoutDeviceIntPoint mChromeOffset;
|
2016-01-05 12:59:30 +03:00
|
|
|
TabId mUniqueId;
|
|
|
|
|
2017-01-13 01:29:41 +03:00
|
|
|
// Holds the compositor options for the compositor rendering this tab,
|
|
|
|
// once we find out which compositor that is.
|
|
|
|
Maybe<mozilla::layers::CompositorOptions> mCompositorOptions;
|
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
friend class ContentChild;
|
|
|
|
|
2016-05-16 05:56:09 +03:00
|
|
|
bool mIsTransparent;
|
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
bool mIPCOpen;
|
|
|
|
bool mParentIsActive;
|
|
|
|
CSSSize mUnscaledInnerSize;
|
|
|
|
bool mDidSetRealShowInfo;
|
2016-03-12 01:31:55 +03:00
|
|
|
bool mDidLoadURLInit;
|
2017-01-26 22:20:44 +03:00
|
|
|
bool mAwaitingLA;
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2017-01-16 12:29:37 +03:00
|
|
|
bool mSkipKeyPress;
|
|
|
|
|
|
|
|
// Store the end time of the handling of the last repeated keydown/keypress
|
|
|
|
// event so that in case event handling takes time, some repeated events can
|
|
|
|
// be skipped to not flood child process.
|
|
|
|
mozilla::TimeStamp mRepeatedKeyEventTime;
|
|
|
|
|
2017-02-21 12:56:46 +03:00
|
|
|
// Similar to mRepeatedKeyEventTime, store the end time (from parent process)
|
|
|
|
// of handling the last repeated wheel event so that in case event handling
|
|
|
|
// takes time, some repeated events can be skipped to not flood child process.
|
|
|
|
mozilla::TimeStamp mLastWheelProcessedTimeFromParent;
|
2017-05-12 14:13:59 +03:00
|
|
|
mozilla::TimeDuration mLastWheelProcessingDuration;
|
2017-10-12 04:05:40 +03:00
|
|
|
|
|
|
|
// Hash table to track coalesced mousemove events for different pointers.
|
2017-09-20 06:57:56 +03:00
|
|
|
nsClassHashtable<nsUint32HashKey, CoalescedMouseData> mCoalescedMouseData;
|
2017-10-12 04:05:40 +03:00
|
|
|
|
|
|
|
nsDeque mToBeDispatchedMouseData;
|
|
|
|
|
2017-02-21 12:56:46 +03:00
|
|
|
CoalescedWheelData mCoalescedWheelData;
|
2017-08-11 09:58:08 +03:00
|
|
|
RefPtr<CoalescedMouseMoveFlusher> mCoalescedMouseEventFlusher;
|
2017-02-21 12:56:46 +03:00
|
|
|
|
2016-07-31 22:39:00 +03:00
|
|
|
RefPtr<layers::IAPZCTreeManager> mApzcTreeManager;
|
2016-01-08 22:17:39 +03:00
|
|
|
|
2016-07-23 02:36:45 +03:00
|
|
|
// The most recently seen layer observer epoch in RecvSetDocShellIsActive.
|
|
|
|
uint64_t mLayerObserverEpoch;
|
|
|
|
|
2016-09-15 22:37:04 +03:00
|
|
|
#if defined(XP_WIN) && defined(ACCESSIBILITY)
|
|
|
|
// The handle associated with the native window that contains this tab
|
|
|
|
uintptr_t mNativeWindowHandle;
|
|
|
|
#endif // defined(XP_WIN)
|
|
|
|
|
2017-05-02 00:04:55 +03:00
|
|
|
#if defined(ACCESSIBILITY)
|
|
|
|
PDocAccessibleChild* mTopLevelDocAccessibleChild;
|
|
|
|
#endif
|
2017-08-11 09:58:08 +03:00
|
|
|
bool mCoalesceMouseMoveEvents;
|
2017-05-02 00:04:55 +03:00
|
|
|
|
2018-01-09 01:53:09 +03:00
|
|
|
// In some circumstances, a DocShell might be in a state where it is
|
|
|
|
// "blocked", and we should not attempt to change its active state or
|
|
|
|
// the underlying PresShell state until the DocShell becomes unblocked.
|
|
|
|
// It is possible, however, for the parent process to send commands to
|
|
|
|
// change those states while the DocShell is blocked. We store those
|
|
|
|
// states temporarily as "pending", and only apply them once the DocShell
|
|
|
|
// is no longer blocked.
|
2017-06-15 20:23:55 +03:00
|
|
|
bool mPendingDocShellIsActive;
|
|
|
|
bool mPendingDocShellReceivedMessage;
|
2018-01-09 01:53:09 +03:00
|
|
|
bool mPendingRenderLayers;
|
|
|
|
bool mPendingRenderLayersReceivedMessage;
|
|
|
|
uint64_t mPendingLayerObserverEpoch;
|
|
|
|
// When mPendingDocShellBlockers is greater than 0, the DocShell is blocked,
|
|
|
|
// and once it reaches 0, it is no longer blocked.
|
2017-06-15 20:23:55 +03:00
|
|
|
uint32_t mPendingDocShellBlockers;
|
|
|
|
|
2017-06-13 20:37:31 +03:00
|
|
|
WindowsHandle mWidgetNativeData;
|
|
|
|
|
2017-11-03 18:27:29 +03:00
|
|
|
// This state is used to keep track of the current visible tabs (the ones rendering
|
|
|
|
// layers). There may be more than one if there are multiple browser windows open, or
|
|
|
|
// tabs are being warmed up. There may be none if this process does not host any
|
|
|
|
// visible or warming tabs.
|
|
|
|
static nsTHashtable<nsPtrHashKey<TabChild>>* sVisibleTabs;
|
2017-07-20 02:10:48 +03:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
DISALLOW_EVIL_CONSTRUCTORS(TabChild);
|
2009-07-01 00:39:22 +04:00
|
|
|
};
|
|
|
|
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
2009-07-01 00:39:22 +04:00
|
|
|
|
2010-08-21 03:24:41 +04:00
|
|
|
#endif // mozilla_dom_TabChild_h
|