2009-08-18 12:05:15 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* vim: set sw=4 ts=8 et tw=80 : */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-06-30 13:39:22 -07:00
|
|
|
|
|
|
|
#ifndef mozilla_tabs_TabParent_h
|
|
|
|
#define mozilla_tabs_TabParent_h
|
|
|
|
|
2012-06-22 18:27:30 -07:00
|
|
|
#include "base/basictypes.h"
|
|
|
|
|
|
|
|
#include "jsapi.h"
|
2010-07-19 11:33:33 -07:00
|
|
|
#include "mozilla/dom/PBrowserParent.h"
|
2010-05-17 04:25:22 -07:00
|
|
|
#include "mozilla/dom/PContentDialogParent.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 10:32:37 -08:00
|
|
|
#include "mozilla/dom/TabContext.h"
|
2009-07-20 11:14:41 -07:00
|
|
|
#include "mozilla/ipc/GeckoChildProcessHost.h"
|
2009-12-31 17:35:55 -08:00
|
|
|
#include "nsCOMPtr.h"
|
2012-06-22 18:27:30 -07:00
|
|
|
#include "nsIAuthPromptProvider.h"
|
2009-12-31 17:35:55 -08:00
|
|
|
#include "nsIBrowserDOMWindow.h"
|
2010-05-17 04:25:22 -07:00
|
|
|
#include "nsIDialogParamBlock.h"
|
2010-08-13 01:06:40 -07:00
|
|
|
#include "nsISecureBrowserUI.h"
|
2012-06-22 18:27:30 -07:00
|
|
|
#include "nsITabParent.h"
|
|
|
|
#include "nsWeakReference.h"
|
2009-12-31 17:35:55 -08:00
|
|
|
|
2010-07-16 23:59:36 -07:00
|
|
|
struct gfxMatrix;
|
2009-11-06 12:43:39 -08:00
|
|
|
struct JSContext;
|
2012-12-31 12:40:21 -08:00
|
|
|
class JSObject;
|
2012-08-08 19:58:06 -07:00
|
|
|
class mozIApplication;
|
2012-06-22 18:27:30 -07:00
|
|
|
class nsFrameLoader;
|
|
|
|
class nsIDOMElement;
|
|
|
|
class nsIURI;
|
2009-11-06 12:43:39 -08:00
|
|
|
|
2009-06-30 13:39:22 -07:00
|
|
|
namespace mozilla {
|
2012-07-19 23:48:27 -07:00
|
|
|
|
|
|
|
namespace layers {
|
|
|
|
struct FrameMetrics;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace layout {
|
|
|
|
class RenderFrameParent;
|
|
|
|
}
|
|
|
|
|
2009-08-12 09:18:08 -07:00
|
|
|
namespace dom {
|
2009-06-30 13:39:22 -07:00
|
|
|
|
2012-08-01 23:02:29 -07:00
|
|
|
class ClonedMessageData;
|
|
|
|
struct StructuredCloneData;
|
|
|
|
|
2010-05-17 04:25:22 -07:00
|
|
|
class ContentDialogParent : public PContentDialogParent {};
|
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
class TabParent : public PBrowserParent
|
2010-06-24 15:20:42 -07:00
|
|
|
, public nsITabParent
|
|
|
|
, public nsIAuthPromptProvider
|
2010-08-13 01:06:40 -07:00
|
|
|
, public nsISecureBrowserUI
|
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 10:32:37 -08:00
|
|
|
, public TabContext
|
2009-06-30 13:39:22 -07:00
|
|
|
{
|
2012-08-01 23:02:29 -07:00
|
|
|
typedef mozilla::dom::ClonedMessageData ClonedMessageData;
|
2012-11-27 12:43:52 -08:00
|
|
|
typedef mozilla::layout::ScrollingBehavior ScrollingBehavior;
|
2012-08-01 23:02:29 -07:00
|
|
|
|
2009-06-30 13:39:22 -07:00
|
|
|
public:
|
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 10:32:37 -08:00
|
|
|
TabParent(const TabContext& aContext);
|
2009-06-30 13:39:22 -07:00
|
|
|
virtual ~TabParent();
|
2010-08-17 20:19:24 -07:00
|
|
|
nsIDOMElement* GetOwnerElement() { return mFrameElement; }
|
2010-12-09 10:57:05 -08:00
|
|
|
void SetOwnerElement(nsIDOMElement* aElement);
|
2010-08-17 20:19:24 -07:00
|
|
|
nsIBrowserDOMWindow *GetBrowserDOMWindow() { return mBrowserDOMWindow; }
|
2009-12-31 17:35:55 -08:00
|
|
|
void SetBrowserDOMWindow(nsIBrowserDOMWindow* aBrowserDOMWindow) {
|
|
|
|
mBrowserDOMWindow = aBrowserDOMWindow;
|
|
|
|
}
|
2012-08-08 19:58:06 -07:00
|
|
|
|
2012-09-11 13:05:52 -07:00
|
|
|
/**
|
|
|
|
* Return the TabParent that has decided it wants to capture an
|
|
|
|
* event series for fast-path dispatch to its subprocess, if one
|
|
|
|
* has.
|
|
|
|
*
|
|
|
|
* DOM event dispatch and widget are free to ignore capture
|
|
|
|
* requests from TabParents; the end result wrt remote content is
|
|
|
|
* (must be) always the same, albeit usually slower without
|
|
|
|
* subprocess capturing. This allows frontends/widget backends to
|
|
|
|
* "opt in" to faster cross-process dispatch.
|
|
|
|
*/
|
|
|
|
static TabParent* GetEventCapturer();
|
|
|
|
/**
|
|
|
|
* If this is the current event capturer, give this a chance to
|
|
|
|
* capture the event. If it was captured, return true, false
|
|
|
|
* otherwise. Un-captured events should follow normal DOM
|
|
|
|
* dispatch; captured events should result in no further
|
|
|
|
* processing from the caller of TryCapture().
|
|
|
|
*
|
|
|
|
* It's an error to call TryCapture() if this isn't the event
|
|
|
|
* capturer.
|
|
|
|
*/
|
|
|
|
bool TryCapture(const nsGUIEvent& aEvent);
|
|
|
|
|
2011-01-05 20:54:47 -08:00
|
|
|
void Destroy();
|
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
virtual bool RecvMoveFocus(const bool& aForward);
|
|
|
|
virtual bool RecvEvent(const RemoteDOMEvent& aEvent);
|
2012-09-28 19:16:36 -07:00
|
|
|
virtual bool RecvPRenderFrameConstructor(PRenderFrameParent* actor,
|
|
|
|
ScrollingBehavior* scrolling,
|
|
|
|
LayersBackend* backend,
|
|
|
|
int32_t* maxTextureSize,
|
|
|
|
uint64_t* layersId);
|
2012-06-12 15:01:25 -07:00
|
|
|
virtual bool RecvBrowserFrameOpenWindow(PBrowserParent* aOpener,
|
|
|
|
const nsString& aURL,
|
|
|
|
const nsString& aName,
|
|
|
|
const nsString& aFeatures,
|
|
|
|
bool* aOutWindowOpened);
|
2010-07-19 11:33:33 -07:00
|
|
|
virtual bool AnswerCreateWindow(PBrowserParent** retval);
|
|
|
|
virtual bool RecvSyncMessage(const nsString& aMessage,
|
2012-08-01 23:02:29 -07:00
|
|
|
const ClonedMessageData& aData,
|
2010-11-08 18:49:00 -08:00
|
|
|
InfallibleTArray<nsString>* aJSONRetVal);
|
2010-07-19 11:33:33 -07:00
|
|
|
virtual bool RecvAsyncMessage(const nsString& aMessage,
|
2012-08-01 23:02:29 -07:00
|
|
|
const ClonedMessageData& aData);
|
2011-09-28 23:19:26 -07:00
|
|
|
virtual bool RecvNotifyIMEFocus(const bool& aFocus,
|
2010-10-01 07:17:37 -07:00
|
|
|
nsIMEUpdatePreference* aPreference,
|
2012-08-22 08:56:38 -07:00
|
|
|
uint32_t* aSeqno);
|
|
|
|
virtual bool RecvNotifyIMETextChange(const uint32_t& aStart,
|
|
|
|
const uint32_t& aEnd,
|
|
|
|
const uint32_t& aNewEnd);
|
|
|
|
virtual bool RecvNotifyIMESelection(const uint32_t& aSeqno,
|
|
|
|
const uint32_t& aAnchor,
|
|
|
|
const uint32_t& aFocus);
|
2010-09-23 20:28:15 -07:00
|
|
|
virtual bool RecvNotifyIMETextHint(const nsString& aText);
|
2011-09-28 23:19:26 -07:00
|
|
|
virtual bool RecvEndIMEComposition(const bool& aCancel,
|
2010-09-23 20:28:15 -07:00
|
|
|
nsString* aComposition);
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual bool RecvGetInputContext(int32_t* aIMEEnabled,
|
2012-10-26 16:35:20 -07:00
|
|
|
int32_t* aIMEOpen,
|
2012-10-29 18:58:29 -07:00
|
|
|
intptr_t* aNativeIMEContext);
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual bool RecvSetInputContext(const int32_t& aIMEEnabled,
|
|
|
|
const int32_t& aIMEOpen,
|
2011-11-27 03:51:52 -08:00
|
|
|
const nsString& aType,
|
2012-08-26 19:16:22 -07:00
|
|
|
const nsString& aInputmode,
|
2011-11-27 03:51:52 -08:00
|
|
|
const nsString& aActionHint,
|
2012-08-22 08:56:38 -07:00
|
|
|
const int32_t& aCause,
|
|
|
|
const int32_t& aFocusChange);
|
|
|
|
virtual bool RecvSetCursor(const uint32_t& aValue);
|
2011-10-20 15:17:09 -07:00
|
|
|
virtual bool RecvSetBackgroundColor(const nscolor& aValue);
|
2010-12-02 17:24:04 -08:00
|
|
|
virtual bool RecvGetDPI(float* aValue);
|
2011-07-21 17:49:35 -07:00
|
|
|
virtual bool RecvGetWidgetNativeData(WindowsHandle* aValue);
|
2012-08-08 21:39:02 -07:00
|
|
|
virtual bool RecvZoomToRect(const gfxRect& aRect);
|
2012-09-28 19:18:18 -07:00
|
|
|
virtual bool RecvUpdateZoomConstraints(const bool& aAllowZoom,
|
|
|
|
const float& aMinZoom,
|
|
|
|
const float& aMaxZoom);
|
2012-08-21 21:37:06 -07:00
|
|
|
virtual bool RecvContentReceivedTouch(const bool& aPreventDefault);
|
2012-08-22 09:32:21 -07:00
|
|
|
virtual PContentDialogParent* AllocPContentDialog(const uint32_t& aType,
|
2010-05-17 04:25:22 -07:00
|
|
|
const nsCString& aName,
|
|
|
|
const nsCString& aFeatures,
|
2010-11-08 18:49:00 -08:00
|
|
|
const InfallibleTArray<int>& aIntParams,
|
|
|
|
const InfallibleTArray<nsString>& aStringParams);
|
2010-05-17 04:25:22 -07:00
|
|
|
virtual bool DeallocPContentDialog(PContentDialogParent* aDialog)
|
|
|
|
{
|
|
|
|
delete aDialog;
|
|
|
|
return true;
|
|
|
|
}
|
2009-06-30 13:39:22 -07:00
|
|
|
|
2010-12-02 17:24:04 -08:00
|
|
|
|
2009-06-30 13:39:22 -07:00
|
|
|
void LoadURL(nsIURI* aURI);
|
2010-08-20 16:24:40 -07:00
|
|
|
// XXX/cjones: it's not clear what we gain by hiding these
|
|
|
|
// message-sending functions under a layer of indirection and
|
|
|
|
// eating the return values
|
|
|
|
void Show(const nsIntSize& size);
|
2011-07-15 14:46:56 -07:00
|
|
|
void UpdateDimensions(const nsRect& rect, const nsIntSize& size);
|
2012-07-19 23:48:27 -07:00
|
|
|
void UpdateFrame(const layers::FrameMetrics& aFrameMetrics);
|
2012-08-08 21:39:02 -07:00
|
|
|
void HandleDoubleTap(const nsIntPoint& aPoint);
|
2012-09-14 18:16:32 -07:00
|
|
|
void HandleSingleTap(const nsIntPoint& aPoint);
|
2012-11-08 11:35:02 -08:00
|
|
|
void HandleLongTap(const nsIntPoint& aPoint);
|
2009-11-05 10:14:22 -08:00
|
|
|
void Activate();
|
2011-06-17 17:08:32 -07:00
|
|
|
void Deactivate();
|
2011-09-30 00:00:48 -07:00
|
|
|
|
2009-11-05 10:21:09 -08:00
|
|
|
void SendMouseEvent(const nsAString& aType, float aX, float aY,
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t aButton, int32_t aClickCount,
|
|
|
|
int32_t aModifiers, bool aIgnoreRootScrollFrame);
|
|
|
|
void SendKeyEvent(const nsAString& aType, int32_t aKeyCode,
|
|
|
|
int32_t aCharCode, int32_t aModifiers,
|
2011-09-28 23:19:26 -07:00
|
|
|
bool aPreventDefault);
|
2011-06-21 17:32:43 -07:00
|
|
|
bool SendRealMouseEvent(nsMouseEvent& event);
|
2012-08-11 18:42:34 -07:00
|
|
|
bool SendMouseWheelEvent(mozilla::widget::WheelEvent& event);
|
2011-06-21 17:32:43 -07:00
|
|
|
bool SendRealKeyEvent(nsKeyEvent& event);
|
2012-07-15 19:58:43 -07:00
|
|
|
bool SendRealTouchEvent(nsTouchEvent& event);
|
2009-10-29 10:58:31 -07:00
|
|
|
|
2010-10-26 15:20:53 -07:00
|
|
|
virtual PDocumentRendererParent*
|
2010-10-26 15:20:53 -07:00
|
|
|
AllocPDocumentRenderer(const nsRect& documentRect, const gfxMatrix& transform,
|
|
|
|
const nsString& bgcolor,
|
2012-08-22 08:56:38 -07:00
|
|
|
const uint32_t& renderFlags, const bool& flushLayout,
|
2010-10-26 15:20:53 -07:00
|
|
|
const nsIntSize& renderSize);
|
2009-12-03 00:16:14 -08:00
|
|
|
virtual bool DeallocPDocumentRenderer(PDocumentRendererParent* actor);
|
2010-03-24 03:47:18 -07:00
|
|
|
|
2012-07-30 07:58:26 -07:00
|
|
|
virtual PContentPermissionRequestParent*
|
2012-11-13 16:06:42 -08:00
|
|
|
AllocPContentPermissionRequest(const nsCString& aType, const nsCString& aAccess, const IPC::Principal& aPrincipal);
|
2010-09-09 22:00:08 -07:00
|
|
|
virtual bool DeallocPContentPermissionRequest(PContentPermissionRequestParent* actor);
|
2010-05-13 10:44:51 -07:00
|
|
|
|
2010-10-20 10:12:32 -07:00
|
|
|
virtual POfflineCacheUpdateParent* AllocPOfflineCacheUpdate(
|
2012-08-23 12:33:46 -07:00
|
|
|
const URIParams& aManifestURI,
|
|
|
|
const URIParams& aDocumentURI,
|
2010-10-20 10:12:32 -07:00
|
|
|
const bool& stickDocument);
|
|
|
|
virtual bool DeallocPOfflineCacheUpdate(POfflineCacheUpdateParent* actor);
|
|
|
|
|
2010-03-30 21:41:44 -07:00
|
|
|
JSBool GetGlobalJSObject(JSContext* cx, JSObject** globalp);
|
2009-11-06 12:43:39 -08:00
|
|
|
|
2010-03-26 11:39:39 -07:00
|
|
|
NS_DECL_ISUPPORTS
|
2010-06-24 15:20:42 -07:00
|
|
|
NS_DECL_NSIAUTHPROMPTPROVIDER
|
2010-08-13 01:06:40 -07:00
|
|
|
NS_DECL_NSISECUREBROWSERUI
|
2010-03-26 11:39:39 -07:00
|
|
|
|
2010-05-17 04:25:22 -07:00
|
|
|
void HandleDelayedDialogs();
|
2010-09-23 20:28:15 -07:00
|
|
|
|
|
|
|
static TabParent *GetIMETabParent() { return mIMETabParent; }
|
|
|
|
bool HandleQueryContentEvent(nsQueryContentEvent& aEvent);
|
2010-10-01 07:17:37 -07:00
|
|
|
bool SendCompositionEvent(nsCompositionEvent& event);
|
|
|
|
bool SendTextEvent(nsTextEvent& event);
|
|
|
|
bool SendSelectionEvent(nsSelectionEvent& event);
|
2012-06-22 18:27:30 -07:00
|
|
|
|
|
|
|
static TabParent* GetFrom(nsFrameLoader* aFrameLoader);
|
|
|
|
static TabParent* GetFrom(nsIContent* aContent);
|
|
|
|
|
2009-11-05 10:14:22 -08:00
|
|
|
protected:
|
2010-03-29 13:29:45 -07:00
|
|
|
bool ReceiveMessage(const nsString& aMessage,
|
2011-09-28 23:19:26 -07:00
|
|
|
bool aSync,
|
2012-08-01 23:02:29 -07:00
|
|
|
const StructuredCloneData* aCloneData,
|
2012-07-30 07:20:58 -07:00
|
|
|
InfallibleTArray<nsString>* aJSONRetVal = nullptr);
|
2010-03-29 13:29:45 -07:00
|
|
|
|
2012-07-17 11:27:27 -07:00
|
|
|
virtual bool Recv__delete__() MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
|
2010-04-11 17:34:02 -07:00
|
|
|
|
2012-06-01 10:21:12 -07:00
|
|
|
virtual PIndexedDBParent* AllocPIndexedDB(const nsCString& aASCIIOrigin,
|
|
|
|
bool* /* aAllowed */);
|
|
|
|
|
|
|
|
virtual bool DeallocPIndexedDB(PIndexedDBParent* aActor);
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
RecvPIndexedDBConstructor(PIndexedDBParent* aActor,
|
|
|
|
const nsCString& aASCIIOrigin,
|
|
|
|
bool* aAllowed);
|
|
|
|
|
2009-11-05 10:14:22 -08:00
|
|
|
nsIDOMElement* mFrameElement;
|
2009-12-31 17:35:55 -08:00
|
|
|
nsCOMPtr<nsIBrowserDOMWindow> mBrowserDOMWindow;
|
2010-03-26 11:39:39 -07:00
|
|
|
|
2010-05-17 04:25:22 -07:00
|
|
|
struct DelayedDialogData
|
|
|
|
{
|
2012-08-22 08:56:38 -07:00
|
|
|
DelayedDialogData(PContentDialogParent* aDialog, uint32_t aType,
|
2010-05-17 04:25:22 -07:00
|
|
|
const nsCString& aName,
|
|
|
|
const nsCString& aFeatures,
|
|
|
|
nsIDialogParamBlock* aParams)
|
|
|
|
: mDialog(aDialog), mType(aType), mName(aName), mFeatures(aFeatures),
|
|
|
|
mParams(aParams) {}
|
|
|
|
|
|
|
|
PContentDialogParent* mDialog;
|
2012-08-22 08:56:38 -07:00
|
|
|
uint32_t mType;
|
2010-05-17 04:25:22 -07:00
|
|
|
nsCString mName;
|
|
|
|
nsCString mFeatures;
|
|
|
|
nsCOMPtr<nsIDialogParamBlock> mParams;
|
|
|
|
};
|
2010-11-08 18:49:00 -08:00
|
|
|
InfallibleTArray<DelayedDialogData*> mDelayedDialogs;
|
2010-05-17 04:25:22 -07:00
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
bool ShouldDelayDialogs();
|
|
|
|
bool AllowContentIME();
|
2010-08-05 15:11:23 -07:00
|
|
|
|
2012-07-19 23:48:27 -07:00
|
|
|
virtual PRenderFrameParent* AllocPRenderFrame(ScrollingBehavior* aScrolling,
|
|
|
|
LayersBackend* aBackend,
|
2012-07-17 16:59:45 -07:00
|
|
|
int32_t* aMaxTextureSize,
|
2012-07-06 11:15:45 -07:00
|
|
|
uint64_t* aLayersId) MOZ_OVERRIDE;
|
|
|
|
virtual bool DeallocPRenderFrame(PRenderFrameParent* aFrame) MOZ_OVERRIDE;
|
2010-08-20 16:24:41 -07:00
|
|
|
|
2010-09-23 20:28:15 -07:00
|
|
|
// IME
|
2010-09-23 20:28:15 -07:00
|
|
|
static TabParent *mIMETabParent;
|
2010-09-23 20:28:15 -07:00
|
|
|
nsString mIMECacheText;
|
2012-08-22 08:56:38 -07:00
|
|
|
uint32_t mIMESelectionAnchor;
|
|
|
|
uint32_t mIMESelectionFocus;
|
2011-09-28 23:19:26 -07:00
|
|
|
bool mIMEComposing;
|
|
|
|
bool mIMECompositionEnding;
|
2010-09-23 20:28:15 -07:00
|
|
|
// Buffer to store composition text during ResetInputState
|
|
|
|
// Compositions in almost all cases are small enough for nsAutoString
|
|
|
|
nsAutoString mIMECompositionText;
|
2012-08-22 08:56:38 -07:00
|
|
|
uint32_t mIMECompositionStart;
|
|
|
|
uint32_t mIMESeqno;
|
2010-09-23 20:28:15 -07:00
|
|
|
|
2012-09-11 13:05:52 -07:00
|
|
|
// The number of event series we're currently capturing.
|
|
|
|
int32_t mEventCaptureDepth;
|
|
|
|
|
2013-01-28 23:49:38 -08:00
|
|
|
nsRect mRect;
|
2012-09-28 19:16:36 -07:00
|
|
|
nsIntSize mDimensions;
|
2013-01-28 23:49:38 -08:00
|
|
|
ScreenOrientation mOrientation;
|
2010-12-09 10:57:05 -08:00
|
|
|
float mDPI;
|
2012-04-25 09:35:58 -07:00
|
|
|
bool mShown;
|
2013-01-28 23:49:38 -08:00
|
|
|
bool mUpdatedDimensions;
|
2010-12-09 10:57:05 -08:00
|
|
|
|
2010-08-05 15:11:23 -07:00
|
|
|
private:
|
|
|
|
already_AddRefed<nsFrameLoader> GetFrameLoader() const;
|
2010-09-23 20:28:15 -07:00
|
|
|
already_AddRefed<nsIWidget> GetWidget() const;
|
2012-07-19 23:48:27 -07:00
|
|
|
layout::RenderFrameParent* GetRenderFrame();
|
2012-04-25 09:35:58 -07:00
|
|
|
void TryCacheDPI();
|
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 10:32:37 -08:00
|
|
|
|
2012-07-19 23:48:27 -07:00
|
|
|
// When true, we create a pan/zoom controller for our frame and
|
|
|
|
// notify it of input events targeting us.
|
|
|
|
bool UseAsyncPanZoom();
|
|
|
|
// If we have a render frame currently, notify it that we're about
|
|
|
|
// to dispatch |aEvent| to our child. If there's a relevant
|
|
|
|
// transform in place, |aOutEvent| is the transformed |aEvent| to
|
|
|
|
// dispatch to content.
|
|
|
|
void MaybeForwardEventToRenderFrame(const nsInputEvent& aEvent,
|
|
|
|
nsInputEvent* aOutEvent);
|
2013-01-10 05:22:14 -08:00
|
|
|
// When true, we've initiated normal shutdown and notified our
|
|
|
|
// managing PContent.
|
|
|
|
bool mMarkedDestroying;
|
2012-11-09 22:09:24 -08:00
|
|
|
// When true, the TabParent is invalid and we should not send IPC messages
|
|
|
|
// anymore.
|
|
|
|
bool mIsDestroyed;
|
2013-02-01 04:23:23 -08:00
|
|
|
// Whether we have already sent a FileDescriptor for the app package.
|
|
|
|
bool mAppPackageFileDescriptorSent;
|
2009-06-30 13:39:22 -07:00
|
|
|
};
|
|
|
|
|
2009-08-12 09:18:08 -07:00
|
|
|
} // namespace dom
|
2009-06-30 13:39:22 -07:00
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif
|