Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
michael@0 | 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
michael@0 | 2 | /* vim: set sw=4 ts=8 et tw=80 : */ |
michael@0 | 3 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #ifndef mozilla_tabs_TabParent_h |
michael@0 | 8 | #define mozilla_tabs_TabParent_h |
michael@0 | 9 | |
michael@0 | 10 | #include "mozilla/EventForwards.h" |
michael@0 | 11 | #include "mozilla/dom/PBrowserParent.h" |
michael@0 | 12 | #include "mozilla/dom/PFilePickerParent.h" |
michael@0 | 13 | #include "mozilla/dom/TabContext.h" |
michael@0 | 14 | #include "nsCOMPtr.h" |
michael@0 | 15 | #include "nsIAuthPromptProvider.h" |
michael@0 | 16 | #include "nsIBrowserDOMWindow.h" |
michael@0 | 17 | #include "nsISecureBrowserUI.h" |
michael@0 | 18 | #include "nsITabParent.h" |
michael@0 | 19 | #include "nsIXULBrowserWindow.h" |
michael@0 | 20 | #include "Units.h" |
michael@0 | 21 | #include "js/TypeDecls.h" |
michael@0 | 22 | |
michael@0 | 23 | class nsFrameLoader; |
michael@0 | 24 | class nsIContent; |
michael@0 | 25 | class nsIPrincipal; |
michael@0 | 26 | class nsIURI; |
michael@0 | 27 | class nsIWidget; |
michael@0 | 28 | class nsILoadContext; |
michael@0 | 29 | class CpowHolder; |
michael@0 | 30 | |
michael@0 | 31 | namespace mozilla { |
michael@0 | 32 | |
michael@0 | 33 | namespace layers { |
michael@0 | 34 | struct FrameMetrics; |
michael@0 | 35 | struct TextureFactoryIdentifier; |
michael@0 | 36 | } |
michael@0 | 37 | |
michael@0 | 38 | namespace layout { |
michael@0 | 39 | class RenderFrameParent; |
michael@0 | 40 | } |
michael@0 | 41 | |
michael@0 | 42 | namespace dom { |
michael@0 | 43 | |
michael@0 | 44 | class ClonedMessageData; |
michael@0 | 45 | class ContentParent; |
michael@0 | 46 | class Element; |
michael@0 | 47 | struct StructuredCloneData; |
michael@0 | 48 | |
michael@0 | 49 | class TabParent : public PBrowserParent |
michael@0 | 50 | , public nsITabParent |
michael@0 | 51 | , public nsIAuthPromptProvider |
michael@0 | 52 | , public nsISecureBrowserUI |
michael@0 | 53 | , public TabContext |
michael@0 | 54 | { |
michael@0 | 55 | typedef mozilla::dom::ClonedMessageData ClonedMessageData; |
michael@0 | 56 | typedef mozilla::layout::ScrollingBehavior ScrollingBehavior; |
michael@0 | 57 | |
michael@0 | 58 | public: |
michael@0 | 59 | // nsITabParent |
michael@0 | 60 | NS_DECL_NSITABPARENT |
michael@0 | 61 | |
michael@0 | 62 | TabParent(ContentParent* aManager, const TabContext& aContext, uint32_t aChromeFlags); |
michael@0 | 63 | virtual ~TabParent(); |
michael@0 | 64 | Element* GetOwnerElement() const { return mFrameElement; } |
michael@0 | 65 | void SetOwnerElement(Element* aElement); |
michael@0 | 66 | |
michael@0 | 67 | /** |
michael@0 | 68 | * Get the mozapptype attribute from this TabParent's owner DOM element. |
michael@0 | 69 | */ |
michael@0 | 70 | void GetAppType(nsAString& aOut); |
michael@0 | 71 | |
michael@0 | 72 | /** |
michael@0 | 73 | * Returns true iff this TabParent's nsIFrameLoader is visible. |
michael@0 | 74 | * |
michael@0 | 75 | * The frameloader's visibility can be independent of e.g. its docshell's |
michael@0 | 76 | * visibility. |
michael@0 | 77 | */ |
michael@0 | 78 | bool IsVisible(); |
michael@0 | 79 | |
michael@0 | 80 | nsIBrowserDOMWindow *GetBrowserDOMWindow() { return mBrowserDOMWindow; } |
michael@0 | 81 | void SetBrowserDOMWindow(nsIBrowserDOMWindow* aBrowserDOMWindow) { |
michael@0 | 82 | mBrowserDOMWindow = aBrowserDOMWindow; |
michael@0 | 83 | } |
michael@0 | 84 | |
michael@0 | 85 | already_AddRefed<nsILoadContext> GetLoadContext(); |
michael@0 | 86 | |
michael@0 | 87 | nsIXULBrowserWindow* GetXULBrowserWindow(); |
michael@0 | 88 | |
michael@0 | 89 | /** |
michael@0 | 90 | * Return the TabParent that has decided it wants to capture an |
michael@0 | 91 | * event series for fast-path dispatch to its subprocess, if one |
michael@0 | 92 | * has. |
michael@0 | 93 | * |
michael@0 | 94 | * DOM event dispatch and widget are free to ignore capture |
michael@0 | 95 | * requests from TabParents; the end result wrt remote content is |
michael@0 | 96 | * (must be) always the same, albeit usually slower without |
michael@0 | 97 | * subprocess capturing. This allows frontends/widget backends to |
michael@0 | 98 | * "opt in" to faster cross-process dispatch. |
michael@0 | 99 | */ |
michael@0 | 100 | static TabParent* GetEventCapturer(); |
michael@0 | 101 | /** |
michael@0 | 102 | * If this is the current event capturer, give this a chance to |
michael@0 | 103 | * capture the event. If it was captured, return true, false |
michael@0 | 104 | * otherwise. Un-captured events should follow normal DOM |
michael@0 | 105 | * dispatch; captured events should result in no further |
michael@0 | 106 | * processing from the caller of TryCapture(). |
michael@0 | 107 | * |
michael@0 | 108 | * It's an error to call TryCapture() if this isn't the event |
michael@0 | 109 | * capturer. |
michael@0 | 110 | */ |
michael@0 | 111 | bool TryCapture(const WidgetGUIEvent& aEvent); |
michael@0 | 112 | |
michael@0 | 113 | void Destroy(); |
michael@0 | 114 | |
michael@0 | 115 | virtual bool RecvMoveFocus(const bool& aForward) MOZ_OVERRIDE; |
michael@0 | 116 | virtual bool RecvEvent(const RemoteDOMEvent& aEvent) MOZ_OVERRIDE; |
michael@0 | 117 | virtual bool RecvReplyKeyEvent(const WidgetKeyboardEvent& event); |
michael@0 | 118 | virtual bool RecvPRenderFrameConstructor(PRenderFrameParent* actor) MOZ_OVERRIDE; |
michael@0 | 119 | virtual bool RecvInitRenderFrame(PRenderFrameParent* aFrame, |
michael@0 | 120 | ScrollingBehavior* scrolling, |
michael@0 | 121 | TextureFactoryIdentifier* identifier, |
michael@0 | 122 | uint64_t* layersId, |
michael@0 | 123 | bool *aSuccess) MOZ_OVERRIDE; |
michael@0 | 124 | virtual bool RecvBrowserFrameOpenWindow(PBrowserParent* aOpener, |
michael@0 | 125 | const nsString& aURL, |
michael@0 | 126 | const nsString& aName, |
michael@0 | 127 | const nsString& aFeatures, |
michael@0 | 128 | bool* aOutWindowOpened) MOZ_OVERRIDE; |
michael@0 | 129 | virtual bool AnswerCreateWindow(PBrowserParent** retval) MOZ_OVERRIDE; |
michael@0 | 130 | virtual bool RecvSyncMessage(const nsString& aMessage, |
michael@0 | 131 | const ClonedMessageData& aData, |
michael@0 | 132 | const InfallibleTArray<CpowEntry>& aCpows, |
michael@0 | 133 | const IPC::Principal& aPrincipal, |
michael@0 | 134 | InfallibleTArray<nsString>* aJSONRetVal) MOZ_OVERRIDE; |
michael@0 | 135 | virtual bool AnswerRpcMessage(const nsString& aMessage, |
michael@0 | 136 | const ClonedMessageData& aData, |
michael@0 | 137 | const InfallibleTArray<CpowEntry>& aCpows, |
michael@0 | 138 | const IPC::Principal& aPrincipal, |
michael@0 | 139 | InfallibleTArray<nsString>* aJSONRetVal) MOZ_OVERRIDE; |
michael@0 | 140 | virtual bool RecvAsyncMessage(const nsString& aMessage, |
michael@0 | 141 | const ClonedMessageData& aData, |
michael@0 | 142 | const InfallibleTArray<CpowEntry>& aCpows, |
michael@0 | 143 | const IPC::Principal& aPrincipal) MOZ_OVERRIDE; |
michael@0 | 144 | virtual bool RecvNotifyIMEFocus(const bool& aFocus, |
michael@0 | 145 | nsIMEUpdatePreference* aPreference, |
michael@0 | 146 | uint32_t* aSeqno) MOZ_OVERRIDE; |
michael@0 | 147 | virtual bool RecvNotifyIMETextChange(const uint32_t& aStart, |
michael@0 | 148 | const uint32_t& aEnd, |
michael@0 | 149 | const uint32_t& aNewEnd, |
michael@0 | 150 | const bool& aCausedByComposition) MOZ_OVERRIDE; |
michael@0 | 151 | virtual bool RecvNotifyIMESelectedCompositionRect(const uint32_t& aOffset, |
michael@0 | 152 | const nsIntRect& aRect, |
michael@0 | 153 | const nsIntRect& aCaretRect) MOZ_OVERRIDE; |
michael@0 | 154 | virtual bool RecvNotifyIMESelection(const uint32_t& aSeqno, |
michael@0 | 155 | const uint32_t& aAnchor, |
michael@0 | 156 | const uint32_t& aFocus, |
michael@0 | 157 | const bool& aCausedByComposition) MOZ_OVERRIDE; |
michael@0 | 158 | virtual bool RecvNotifyIMETextHint(const nsString& aText) MOZ_OVERRIDE; |
michael@0 | 159 | virtual bool RecvEndIMEComposition(const bool& aCancel, |
michael@0 | 160 | nsString* aComposition) MOZ_OVERRIDE; |
michael@0 | 161 | virtual bool RecvGetInputContext(int32_t* aIMEEnabled, |
michael@0 | 162 | int32_t* aIMEOpen, |
michael@0 | 163 | intptr_t* aNativeIMEContext) MOZ_OVERRIDE; |
michael@0 | 164 | virtual bool RecvSetInputContext(const int32_t& aIMEEnabled, |
michael@0 | 165 | const int32_t& aIMEOpen, |
michael@0 | 166 | const nsString& aType, |
michael@0 | 167 | const nsString& aInputmode, |
michael@0 | 168 | const nsString& aActionHint, |
michael@0 | 169 | const int32_t& aCause, |
michael@0 | 170 | const int32_t& aFocusChange) MOZ_OVERRIDE; |
michael@0 | 171 | virtual bool RecvRequestFocus(const bool& aCanRaise) MOZ_OVERRIDE; |
michael@0 | 172 | virtual bool RecvSetCursor(const uint32_t& aValue) MOZ_OVERRIDE; |
michael@0 | 173 | virtual bool RecvSetBackgroundColor(const nscolor& aValue) MOZ_OVERRIDE; |
michael@0 | 174 | virtual bool RecvSetStatus(const uint32_t& aType, const nsString& aStatus) MOZ_OVERRIDE; |
michael@0 | 175 | virtual bool RecvIsParentWindowMainWidgetVisible(bool* aIsVisible); |
michael@0 | 176 | virtual bool RecvShowTooltip(const uint32_t& aX, const uint32_t& aY, const nsString& aTooltip); |
michael@0 | 177 | virtual bool RecvHideTooltip(); |
michael@0 | 178 | virtual bool RecvGetDPI(float* aValue) MOZ_OVERRIDE; |
michael@0 | 179 | virtual bool RecvGetDefaultScale(double* aValue) MOZ_OVERRIDE; |
michael@0 | 180 | virtual bool RecvGetWidgetNativeData(WindowsHandle* aValue) MOZ_OVERRIDE; |
michael@0 | 181 | virtual bool RecvZoomToRect(const uint32_t& aPresShellId, |
michael@0 | 182 | const ViewID& aViewId, |
michael@0 | 183 | const CSSRect& aRect) MOZ_OVERRIDE; |
michael@0 | 184 | virtual bool RecvUpdateZoomConstraints(const uint32_t& aPresShellId, |
michael@0 | 185 | const ViewID& aViewId, |
michael@0 | 186 | const bool& aIsRoot, |
michael@0 | 187 | const ZoomConstraints& aConstraints) MOZ_OVERRIDE; |
michael@0 | 188 | virtual bool RecvContentReceivedTouch(const ScrollableLayerGuid& aGuid, |
michael@0 | 189 | const bool& aPreventDefault) MOZ_OVERRIDE; |
michael@0 | 190 | |
michael@0 | 191 | virtual PColorPickerParent* |
michael@0 | 192 | AllocPColorPickerParent(const nsString& aTitle, const nsString& aInitialColor) MOZ_OVERRIDE; |
michael@0 | 193 | virtual bool DeallocPColorPickerParent(PColorPickerParent* aColorPicker) MOZ_OVERRIDE; |
michael@0 | 194 | |
michael@0 | 195 | void LoadURL(nsIURI* aURI); |
michael@0 | 196 | // XXX/cjones: it's not clear what we gain by hiding these |
michael@0 | 197 | // message-sending functions under a layer of indirection and |
michael@0 | 198 | // eating the return values |
michael@0 | 199 | void Show(const nsIntSize& size); |
michael@0 | 200 | void UpdateDimensions(const nsRect& rect, const nsIntSize& size); |
michael@0 | 201 | void UpdateFrame(const layers::FrameMetrics& aFrameMetrics); |
michael@0 | 202 | void AcknowledgeScrollUpdate(const ViewID& aScrollId, const uint32_t& aScrollGeneration); |
michael@0 | 203 | void HandleDoubleTap(const CSSPoint& aPoint, |
michael@0 | 204 | int32_t aModifiers, |
michael@0 | 205 | const ScrollableLayerGuid& aGuid); |
michael@0 | 206 | void HandleSingleTap(const CSSPoint& aPoint, |
michael@0 | 207 | int32_t aModifiers, |
michael@0 | 208 | const ScrollableLayerGuid& aGuid); |
michael@0 | 209 | void HandleLongTap(const CSSPoint& aPoint, |
michael@0 | 210 | int32_t aModifiers, |
michael@0 | 211 | const ScrollableLayerGuid& aGuid); |
michael@0 | 212 | void HandleLongTapUp(const CSSPoint& aPoint, |
michael@0 | 213 | int32_t aModifiers, |
michael@0 | 214 | const ScrollableLayerGuid& aGuid); |
michael@0 | 215 | void NotifyAPZStateChange(ViewID aViewId, |
michael@0 | 216 | APZStateChange aChange, |
michael@0 | 217 | int aArg); |
michael@0 | 218 | void Activate(); |
michael@0 | 219 | void Deactivate(); |
michael@0 | 220 | |
michael@0 | 221 | bool MapEventCoordinatesForChildProcess(mozilla::WidgetEvent* aEvent); |
michael@0 | 222 | void MapEventCoordinatesForChildProcess(const LayoutDeviceIntPoint& aOffset, |
michael@0 | 223 | mozilla::WidgetEvent* aEvent); |
michael@0 | 224 | |
michael@0 | 225 | virtual bool RecvRequestNativeKeyBindings(const mozilla::WidgetKeyboardEvent& aEvent, |
michael@0 | 226 | MaybeNativeKeyBinding* aBindings) MOZ_OVERRIDE; |
michael@0 | 227 | |
michael@0 | 228 | void SendMouseEvent(const nsAString& aType, float aX, float aY, |
michael@0 | 229 | int32_t aButton, int32_t aClickCount, |
michael@0 | 230 | int32_t aModifiers, bool aIgnoreRootScrollFrame); |
michael@0 | 231 | void SendKeyEvent(const nsAString& aType, int32_t aKeyCode, |
michael@0 | 232 | int32_t aCharCode, int32_t aModifiers, |
michael@0 | 233 | bool aPreventDefault); |
michael@0 | 234 | bool SendRealMouseEvent(mozilla::WidgetMouseEvent& event); |
michael@0 | 235 | bool SendMouseWheelEvent(mozilla::WidgetWheelEvent& event); |
michael@0 | 236 | bool SendRealKeyEvent(mozilla::WidgetKeyboardEvent& event); |
michael@0 | 237 | bool SendRealTouchEvent(WidgetTouchEvent& event); |
michael@0 | 238 | bool SendHandleSingleTap(const CSSPoint& aPoint, const ScrollableLayerGuid& aGuid); |
michael@0 | 239 | bool SendHandleLongTap(const CSSPoint& aPoint, const ScrollableLayerGuid& aGuid); |
michael@0 | 240 | bool SendHandleLongTapUp(const CSSPoint& aPoint, const ScrollableLayerGuid& aGuid); |
michael@0 | 241 | bool SendHandleDoubleTap(const CSSPoint& aPoint, const ScrollableLayerGuid& aGuid); |
michael@0 | 242 | |
michael@0 | 243 | virtual PDocumentRendererParent* |
michael@0 | 244 | AllocPDocumentRendererParent(const nsRect& documentRect, |
michael@0 | 245 | const gfx::Matrix& transform, |
michael@0 | 246 | const nsString& bgcolor, |
michael@0 | 247 | const uint32_t& renderFlags, |
michael@0 | 248 | const bool& flushLayout, |
michael@0 | 249 | const nsIntSize& renderSize) MOZ_OVERRIDE; |
michael@0 | 250 | virtual bool DeallocPDocumentRendererParent(PDocumentRendererParent* actor) MOZ_OVERRIDE; |
michael@0 | 251 | |
michael@0 | 252 | virtual PContentPermissionRequestParent* |
michael@0 | 253 | AllocPContentPermissionRequestParent(const InfallibleTArray<PermissionRequest>& aRequests, |
michael@0 | 254 | const IPC::Principal& aPrincipal) MOZ_OVERRIDE; |
michael@0 | 255 | virtual bool |
michael@0 | 256 | DeallocPContentPermissionRequestParent(PContentPermissionRequestParent* actor) MOZ_OVERRIDE; |
michael@0 | 257 | |
michael@0 | 258 | virtual PFilePickerParent* |
michael@0 | 259 | AllocPFilePickerParent(const nsString& aTitle, |
michael@0 | 260 | const int16_t& aMode) MOZ_OVERRIDE; |
michael@0 | 261 | virtual bool DeallocPFilePickerParent(PFilePickerParent* actor) MOZ_OVERRIDE; |
michael@0 | 262 | |
michael@0 | 263 | virtual POfflineCacheUpdateParent* |
michael@0 | 264 | AllocPOfflineCacheUpdateParent(const URIParams& aManifestURI, |
michael@0 | 265 | const URIParams& aDocumentURI, |
michael@0 | 266 | const bool& aStickDocument) MOZ_OVERRIDE; |
michael@0 | 267 | virtual bool |
michael@0 | 268 | RecvPOfflineCacheUpdateConstructor(POfflineCacheUpdateParent* aActor, |
michael@0 | 269 | const URIParams& aManifestURI, |
michael@0 | 270 | const URIParams& aDocumentURI, |
michael@0 | 271 | const bool& stickDocument) MOZ_OVERRIDE; |
michael@0 | 272 | virtual bool |
michael@0 | 273 | DeallocPOfflineCacheUpdateParent(POfflineCacheUpdateParent* aActor) MOZ_OVERRIDE; |
michael@0 | 274 | |
michael@0 | 275 | virtual bool RecvSetOfflinePermission(const IPC::Principal& principal) MOZ_OVERRIDE; |
michael@0 | 276 | |
michael@0 | 277 | bool GetGlobalJSObject(JSContext* cx, JSObject** globalp); |
michael@0 | 278 | |
michael@0 | 279 | NS_DECL_ISUPPORTS |
michael@0 | 280 | NS_DECL_NSIAUTHPROMPTPROVIDER |
michael@0 | 281 | NS_DECL_NSISECUREBROWSERUI |
michael@0 | 282 | |
michael@0 | 283 | static TabParent *GetIMETabParent() { return mIMETabParent; } |
michael@0 | 284 | bool HandleQueryContentEvent(mozilla::WidgetQueryContentEvent& aEvent); |
michael@0 | 285 | bool SendCompositionEvent(mozilla::WidgetCompositionEvent& event); |
michael@0 | 286 | bool SendTextEvent(mozilla::WidgetTextEvent& event); |
michael@0 | 287 | bool SendSelectionEvent(mozilla::WidgetSelectionEvent& event); |
michael@0 | 288 | |
michael@0 | 289 | static TabParent* GetFrom(nsFrameLoader* aFrameLoader); |
michael@0 | 290 | static TabParent* GetFrom(nsIContent* aContent); |
michael@0 | 291 | |
michael@0 | 292 | ContentParent* Manager() { return mManager; } |
michael@0 | 293 | |
michael@0 | 294 | /** |
michael@0 | 295 | * Let managees query if Destroy() is already called so they don't send out |
michael@0 | 296 | * messages when the PBrowser actor is being destroyed. |
michael@0 | 297 | */ |
michael@0 | 298 | bool IsDestroyed() const { return mIsDestroyed; } |
michael@0 | 299 | |
michael@0 | 300 | protected: |
michael@0 | 301 | bool ReceiveMessage(const nsString& aMessage, |
michael@0 | 302 | bool aSync, |
michael@0 | 303 | const StructuredCloneData* aCloneData, |
michael@0 | 304 | CpowHolder* aCpows, |
michael@0 | 305 | nsIPrincipal* aPrincipal, |
michael@0 | 306 | InfallibleTArray<nsString>* aJSONRetVal = nullptr); |
michael@0 | 307 | |
michael@0 | 308 | virtual bool Recv__delete__() MOZ_OVERRIDE; |
michael@0 | 309 | |
michael@0 | 310 | virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE; |
michael@0 | 311 | |
michael@0 | 312 | virtual PIndexedDBParent* AllocPIndexedDBParent( |
michael@0 | 313 | const nsCString& aGroup, |
michael@0 | 314 | const nsCString& aASCIIOrigin, |
michael@0 | 315 | bool* /* aAllowed */) MOZ_OVERRIDE; |
michael@0 | 316 | |
michael@0 | 317 | virtual bool DeallocPIndexedDBParent(PIndexedDBParent* aActor) MOZ_OVERRIDE; |
michael@0 | 318 | |
michael@0 | 319 | virtual bool |
michael@0 | 320 | RecvPIndexedDBConstructor(PIndexedDBParent* aActor, |
michael@0 | 321 | const nsCString& aGroup, |
michael@0 | 322 | const nsCString& aASCIIOrigin, |
michael@0 | 323 | bool* aAllowed) MOZ_OVERRIDE; |
michael@0 | 324 | |
michael@0 | 325 | Element* mFrameElement; |
michael@0 | 326 | nsCOMPtr<nsIBrowserDOMWindow> mBrowserDOMWindow; |
michael@0 | 327 | |
michael@0 | 328 | bool AllowContentIME(); |
michael@0 | 329 | nsIntPoint GetChildProcessOffset(); |
michael@0 | 330 | |
michael@0 | 331 | virtual PRenderFrameParent* AllocPRenderFrameParent() MOZ_OVERRIDE; |
michael@0 | 332 | virtual bool DeallocPRenderFrameParent(PRenderFrameParent* aFrame) MOZ_OVERRIDE; |
michael@0 | 333 | |
michael@0 | 334 | // IME |
michael@0 | 335 | static TabParent *mIMETabParent; |
michael@0 | 336 | nsString mIMECacheText; |
michael@0 | 337 | uint32_t mIMESelectionAnchor; |
michael@0 | 338 | uint32_t mIMESelectionFocus; |
michael@0 | 339 | bool mIMEComposing; |
michael@0 | 340 | bool mIMECompositionEnding; |
michael@0 | 341 | // Buffer to store composition text during ResetInputState |
michael@0 | 342 | // Compositions in almost all cases are small enough for nsAutoString |
michael@0 | 343 | nsAutoString mIMECompositionText; |
michael@0 | 344 | uint32_t mIMECompositionStart; |
michael@0 | 345 | uint32_t mIMESeqno; |
michael@0 | 346 | |
michael@0 | 347 | uint32_t mIMECompositionRectOffset; |
michael@0 | 348 | nsIntRect mIMECompositionRect; |
michael@0 | 349 | nsIntRect mIMECaretRect; |
michael@0 | 350 | |
michael@0 | 351 | // The number of event series we're currently capturing. |
michael@0 | 352 | int32_t mEventCaptureDepth; |
michael@0 | 353 | |
michael@0 | 354 | nsRect mRect; |
michael@0 | 355 | nsIntSize mDimensions; |
michael@0 | 356 | ScreenOrientation mOrientation; |
michael@0 | 357 | float mDPI; |
michael@0 | 358 | CSSToLayoutDeviceScale mDefaultScale; |
michael@0 | 359 | bool mShown; |
michael@0 | 360 | bool mUpdatedDimensions; |
michael@0 | 361 | |
michael@0 | 362 | private: |
michael@0 | 363 | already_AddRefed<nsFrameLoader> GetFrameLoader() const; |
michael@0 | 364 | already_AddRefed<nsIWidget> GetWidget() const; |
michael@0 | 365 | layout::RenderFrameParent* GetRenderFrame(); |
michael@0 | 366 | nsRefPtr<ContentParent> mManager; |
michael@0 | 367 | void TryCacheDPIAndScale(); |
michael@0 | 368 | |
michael@0 | 369 | CSSPoint AdjustTapToChildWidget(const CSSPoint& aPoint); |
michael@0 | 370 | |
michael@0 | 371 | // When true, we create a pan/zoom controller for our frame and |
michael@0 | 372 | // notify it of input events targeting us. |
michael@0 | 373 | bool UseAsyncPanZoom(); |
michael@0 | 374 | // If we have a render frame currently, notify it that we're about |
michael@0 | 375 | // to dispatch |aEvent| to our child. If there's a relevant |
michael@0 | 376 | // transform in place, |aEvent| will be transformed in-place so that |
michael@0 | 377 | // it is ready to be dispatched to content. |
michael@0 | 378 | // |aOutTargetGuid| will contain the identifier |
michael@0 | 379 | // of the APZC instance that handled the event. aOutTargetGuid may be |
michael@0 | 380 | // null. |
michael@0 | 381 | void MaybeForwardEventToRenderFrame(WidgetInputEvent& aEvent, |
michael@0 | 382 | ScrollableLayerGuid* aOutTargetGuid); |
michael@0 | 383 | // The offset for the child process which is sampled at touch start. This |
michael@0 | 384 | // means that the touch events are relative to where the frame was at the |
michael@0 | 385 | // start of the touch. We need to look for a better solution to this |
michael@0 | 386 | // problem see bug 872911. |
michael@0 | 387 | LayoutDeviceIntPoint mChildProcessOffsetAtTouchStart; |
michael@0 | 388 | // When true, we've initiated normal shutdown and notified our |
michael@0 | 389 | // managing PContent. |
michael@0 | 390 | bool mMarkedDestroying; |
michael@0 | 391 | // When true, the TabParent is invalid and we should not send IPC messages |
michael@0 | 392 | // anymore. |
michael@0 | 393 | bool mIsDestroyed; |
michael@0 | 394 | // Whether we have already sent a FileDescriptor for the app package. |
michael@0 | 395 | bool mAppPackageFileDescriptorSent; |
michael@0 | 396 | |
michael@0 | 397 | uint32_t mChromeFlags; |
michael@0 | 398 | |
michael@0 | 399 | nsCOMPtr<nsILoadContext> mLoadContext; |
michael@0 | 400 | }; |
michael@0 | 401 | |
michael@0 | 402 | } // namespace dom |
michael@0 | 403 | } // namespace mozilla |
michael@0 | 404 | |
michael@0 | 405 | #endif |