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

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

Issue 1215973002: Oilpan: improve ScrollableArea handling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review-induced improvements Created 5 years, 6 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/FrameView.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 69871ffa41720f1148a973251aed45a20dcd98b6..e2c72812e9cd693ac044a9908658c303e168e50f 100644
--- a/Source/core/frame/PinchViewport.h
+++ b/Source/core/frame/PinchViewport.h
@@ -62,14 +62,17 @@ 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 CORE_EXPORT PinchViewport final : public GraphicsLayerClient, public ScrollableArea {
+class CORE_EXPORT PinchViewport final : public NoBaseWillBeGarbageCollectedFinalized<PinchViewport>, public GraphicsLayerClient, public ScrollableArea {
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PinchViewport);
public:
- static PassOwnPtr<PinchViewport> create(FrameHost& host)
+ static PassOwnPtrWillBeRawPtr<PinchViewport> create(FrameHost& host)
{
- return adoptPtr(new PinchViewport(host));
+ return adoptPtrWillBeNoop(new PinchViewport(host));
}
virtual ~PinchViewport();
+ DECLARE_VIRTUAL_TRACE();
+
void attachToLayerTree(GraphicsLayer*, GraphicsLayerFactory*);
GraphicsLayer* rootGraphicsLayer()
{
@@ -203,13 +206,11 @@ private:
FrameHost& frameHost() const
{
- return m_frameHost;
+ ASSERT(m_frameHost);
+ return *m_frameHost;
}
- // TODO(Oilpan): this back reference is safe, but not ideal.
- // Turning it into a traced Member<> would require moving
- // ScrollableArea to the heap.
- FrameHost& m_frameHost;
+ RawPtrWillBeMember<FrameHost> m_frameHost;
OwnPtr<GraphicsLayer> m_rootTransformLayer;
OwnPtr<GraphicsLayer> m_innerViewportContainerLayer;
OwnPtr<GraphicsLayer> m_overscrollElasticityLayer;
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/frame/PinchViewport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698