Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Side by Side Diff: Source/web/WebViewImpl.h

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Comments + fix fast/events/message-port-gc-closed.html Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebViewImpl_h 31 #ifndef WebViewImpl_h
32 #define WebViewImpl_h 32 #define WebViewImpl_h
33 33
34 #include "core/page/PagePopupDriver.h" 34 #include "core/page/PagePopupDriver.h"
35 #include "platform/geometry/IntPoint.h" 35 #include "platform/geometry/IntPoint.h"
36 #include "platform/geometry/IntRect.h" 36 #include "platform/geometry/IntRect.h"
37 #include "platform/graphics/GraphicsLayer.h" 37 #include "platform/graphics/GraphicsLayer.h"
38 #include "platform/heap/Handle.h"
38 #include "public/platform/WebGestureCurveTarget.h" 39 #include "public/platform/WebGestureCurveTarget.h"
39 #include "public/platform/WebLayer.h" 40 #include "public/platform/WebLayer.h"
40 #include "public/platform/WebPoint.h" 41 #include "public/platform/WebPoint.h"
41 #include "public/platform/WebRect.h" 42 #include "public/platform/WebRect.h"
42 #include "public/platform/WebSize.h" 43 #include "public/platform/WebSize.h"
43 #include "public/platform/WebString.h" 44 #include "public/platform/WebString.h"
44 #include "public/platform/WebVector.h" 45 #include "public/platform/WebVector.h"
45 #include "public/web/WebInputEvent.h" 46 #include "public/web/WebInputEvent.h"
46 #include "public/web/WebNavigationPolicy.h" 47 #include "public/web/WebNavigationPolicy.h"
47 #include "public/web/WebView.h" 48 #include "public/web/WebView.h"
(...skipping 18 matching lines...) Expand all
66 class DataObject; 67 class DataObject;
67 class Frame; 68 class Frame;
68 class FullscreenController; 69 class FullscreenController;
69 class LinkHighlight; 70 class LinkHighlight;
70 class PopupContainer; 71 class PopupContainer;
71 class RenderLayerCompositor; 72 class RenderLayerCompositor;
72 class UserGestureToken; 73 class UserGestureToken;
73 class WebActiveGestureAnimation; 74 class WebActiveGestureAnimation;
74 class WebDevToolsAgentPrivate; 75 class WebDevToolsAgentPrivate;
75 class WebLocalFrameImpl; 76 class WebLocalFrameImpl;
77 class WebRemoteFrameImpl;
76 class WebImage; 78 class WebImage;
77 class WebPagePopupImpl; 79 class WebPagePopupImpl;
78 class WebPlugin; 80 class WebPlugin;
79 class WebSettingsImpl; 81 class WebSettingsImpl;
80 82
81 class WebViewImpl FINAL : public WebView 83 class WebViewImpl FINAL : public WebView
82 , public RefCounted<WebViewImpl> 84 , public RefCounted<WebViewImpl>
83 , public WebGestureCurveTarget 85 , public WebGestureCurveTarget
84 , public PagePopupDriver 86 , public PagePopupDriver
85 , public PageWidgetEventHandler { 87 , public PageWidgetEventHandler {
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 486
485 // Exposed for tests. 487 // Exposed for tests.
486 WebVector<WebCompositionUnderline> compositionUnderlines() const; 488 WebVector<WebCompositionUnderline> compositionUnderlines() const;
487 489
488 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } 490 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; }
489 491
490 bool pinchVirtualViewportEnabled() const; 492 bool pinchVirtualViewportEnabled() const;
491 493
492 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match esHeuristicsForGpuRasterization; } 494 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match esHeuristicsForGpuRasterization; }
493 495
496 #if ENABLE(OILPAN)
497 void clearMainFrame(WebLocalFrameImpl*);
498 void clearMainFrame(WebRemoteFrameImpl*);
499 #endif
500
494 private: 501 private:
495 void setTopControlsContentOffset(float); 502 void setTopControlsContentOffset(float);
496 503
497 // TODO(bokan): Remains for legacy pinch. Remove once it's gone. Made privat e to 504 // TODO(bokan): Remains for legacy pinch. Remove once it's gone. Made privat e to
498 // prevent external usage 505 // prevent external usage
499 virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) O VERRIDE; 506 virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) O VERRIDE;
500 507
501 float legibleScale() const; 508 float legibleScale() const;
502 void refreshPageScaleFactorAfterLayout(); 509 void refreshPageScaleFactorAfterLayout();
503 void resumeTreeViewCommits(); 510 void resumeTreeViewCommits();
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 bool m_fixedLayoutSizeLock; 604 bool m_fixedLayoutSizeLock;
598 // If true, automatically resize the render view around its content. 605 // If true, automatically resize the render view around its content.
599 bool m_shouldAutoResize; 606 bool m_shouldAutoResize;
600 // The lower bound on the size when auto-resizing. 607 // The lower bound on the size when auto-resizing.
601 IntSize m_minAutoSize; 608 IntSize m_minAutoSize;
602 // The upper bound on the size when auto-resizing. 609 // The upper bound on the size when auto-resizing.
603 IntSize m_maxAutoSize; 610 IntSize m_maxAutoSize;
604 611
605 OwnPtrWillBePersistent<Page> m_page; 612 OwnPtrWillBePersistent<Page> m_page;
606 613
614 #if ENABLE(OILPAN)
615 // With Oilpan, the WebViewImpl object keeps a strong reference to one kind of main
616 // frame, so as to keep it alive until the view lets it go.
617 //
618 // In the non-Oilpan case, the ref-counted frame is instead created and retu rned with
619 // a ref count that must be balanced by eventually calling close() on the
620 // Web*FrameImpl object. That close() call is also assumed for Oilpan, but w e need
621 // to keep the object alive until that time. Hence these mutually-exclusive Persistent<>s.
622 Persistent<WebLocalFrameImpl> m_localMainFrame;
623 Persistent<WebRemoteFrameImpl> m_remoteMainFrame;
624 #endif
625
607 // An object that can be used to manipulate m_page->settings() without linki ng 626 // An object that can be used to manipulate m_page->settings() without linki ng
608 // against WebCore. This is lazily allocated the first time GetWebSettings() 627 // against WebCore. This is lazily allocated the first time GetWebSettings()
609 // is called. 628 // is called.
610 OwnPtr<WebSettingsImpl> m_webSettings; 629 OwnPtr<WebSettingsImpl> m_webSettings;
611 630
612 // A copy of the web drop data object we received from the browser. 631 // A copy of the web drop data object we received from the browser.
613 RefPtrWillBePersistent<DataObject> m_currentDragData; 632 RefPtrWillBePersistent<DataObject> m_currentDragData;
614 633
615 // The point relative to the client area where the mouse was last pressed 634 // The point relative to the client area where the mouse was last pressed
616 // down. This is used by the drag client to determine what was under the 635 // down. This is used by the drag client to determine what was under the
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 bool m_recreatingGraphicsContext; 723 bool m_recreatingGraphicsContext;
705 static const WebInputEvent* m_currentInputEvent; 724 static const WebInputEvent* m_currentInputEvent;
706 725
707 MediaKeysClientImpl m_mediaKeysClientImpl; 726 MediaKeysClientImpl m_mediaKeysClientImpl;
708 OwnPtr<WebActiveGestureAnimation> m_gestureAnimation; 727 OwnPtr<WebActiveGestureAnimation> m_gestureAnimation;
709 WebPoint m_positionOnFlingStart; 728 WebPoint m_positionOnFlingStart;
710 WebPoint m_globalPositionOnFlingStart; 729 WebPoint m_globalPositionOnFlingStart;
711 int m_flingModifier; 730 int m_flingModifier;
712 bool m_flingSourceDevice; 731 bool m_flingSourceDevice;
713 Vector<OwnPtr<LinkHighlight> > m_linkHighlights; 732 Vector<OwnPtr<LinkHighlight> > m_linkHighlights;
714 OwnPtr<FullscreenController> m_fullscreenController; 733 OwnPtrWillBePersistent<FullscreenController> m_fullscreenController;
715 734
716 bool m_showFPSCounter; 735 bool m_showFPSCounter;
717 bool m_showPaintRects; 736 bool m_showPaintRects;
718 bool m_showDebugBorders; 737 bool m_showDebugBorders;
719 bool m_continuousPaintingEnabled; 738 bool m_continuousPaintingEnabled;
720 bool m_showScrollBottleneckRects; 739 bool m_showScrollBottleneckRects;
721 WebColor m_baseBackgroundColor; 740 WebColor m_baseBackgroundColor;
722 WebColor m_backgroundColorOverride; 741 WebColor m_backgroundColorOverride;
723 float m_zoomFactorOverride; 742 float m_zoomFactorOverride;
724 743
725 bool m_userGestureObserved; 744 bool m_userGestureObserved;
726 float m_topControlsContentOffset; 745 float m_topControlsContentOffset;
727 }; 746 };
728 747
729 // We have no ways to check if the specified WebView is an instance of 748 // We have no ways to check if the specified WebView is an instance of
730 // WebViewImpl because WebViewImpl is the only implementation of WebView. 749 // WebViewImpl because WebViewImpl is the only implementation of WebView.
731 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); 750 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true);
732 751
733 } // namespace blink 752 } // namespace blink
734 753
735 #endif 754 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698