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

Unified Diff: Source/core/frame/PinchViewport.h

Issue 642003002: Move PinchViewport to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/FrameHost.cpp ('k') | Source/core/frame/PinchViewport.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/PinchViewport.h
diff --git a/Source/core/frame/PinchViewport.h b/Source/core/frame/PinchViewport.h
index 4ab3a0246d63e1fb369b94916424311e8128b66a..6ab9b65a16a32d419cfd42fddd04225dd148e964 100644
--- a/Source/core/frame/PinchViewport.h
+++ b/Source/core/frame/PinchViewport.h
@@ -61,10 +61,14 @@ class LocalFrame;
// offset is set through the GraphicsLayer <-> CC sync mechanisms. Its contents is the page's
// main FrameView, which corresponds to the outer viewport. The inner viewport is always contained
// in the outer viewport and can pan within it.
-class PinchViewport final : public GraphicsLayerClient, public ScrollableArea {
+class PinchViewport final : public NoBaseWillBeGarbageCollectedFinalized<PinchViewport>, public GraphicsLayerClient, public ScrollableArea {
public:
- explicit PinchViewport(FrameHost&);
+ static PassOwnPtrWillBeRawPtr<PinchViewport> create(FrameHost& host)
+ {
+ return adoptPtrWillBeNoop(new PinchViewport(host));
+ }
virtual ~PinchViewport();
+ virtual void trace(Visitor*);
void attachToLayerTree(GraphicsLayer*, GraphicsLayerFactory*);
GraphicsLayer* rootGraphicsLayer()
@@ -119,6 +123,8 @@ public:
IntPoint clampDocumentOffsetAtScale(const IntPoint& offset, float scale);
private:
+ explicit PinchViewport(FrameHost&);
+
// ScrollableArea implementation
virtual bool isActive() const override { return false; }
virtual int scrollSize(ScrollbarOrientation) const override;
@@ -153,7 +159,13 @@ private:
LocalFrame* mainFrame() const;
- FrameHost& m_frameHost;
+ FrameHost& frameHost() const
+ {
+ ASSERT(m_frameHost);
+ return *m_frameHost;
+ }
+
+ RawPtrWillBeMember<FrameHost> m_frameHost;
OwnPtr<GraphicsLayer> m_rootTransformLayer;
OwnPtr<GraphicsLayer> m_innerViewportContainerLayer;
OwnPtr<GraphicsLayer> m_pageScaleLayer;
« no previous file with comments | « Source/core/frame/FrameHost.cpp ('k') | Source/core/frame/PinchViewport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698