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

Unified Diff: third_party/WebKit/Source/core/frame/VisualViewport.h

Issue 2727563004: Change VisualViewport to store a Page instead of a FrameHost (Closed)
Patch Set: Rebase Created 3 years, 9 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
Index: third_party/WebKit/Source/core/frame/VisualViewport.h
diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.h b/third_party/WebKit/Source/core/frame/VisualViewport.h
index 3ec75a4536fd1940c5441662a72755b5c1e1845f..4a864214f9055f2355c27113590f83e66ffdfee7 100644
--- a/third_party/WebKit/Source/core/frame/VisualViewport.h
+++ b/third_party/WebKit/Source/core/frame/VisualViewport.h
@@ -34,7 +34,6 @@
#include <memory>
#include "core/CoreExport.h"
#include "core/events/Event.h"
-#include "core/frame/FrameHost.h"
#include "platform/geometry/FloatRect.h"
#include "platform/geometry/FloatSize.h"
#include "platform/geometry/IntSize.h"
@@ -89,9 +88,7 @@ class CORE_EXPORT VisualViewport final
USING_GARBAGE_COLLECTED_MIXIN(VisualViewport);
public:
- static VisualViewport* create(FrameHost& host) {
- return new VisualViewport(host);
- }
+ static VisualViewport* create(Page& host) { return new VisualViewport(host); }
~VisualViewport() override;
DECLARE_VIRTUAL_TRACE();
@@ -236,7 +233,7 @@ class CORE_EXPORT VisualViewport final
bool shouldDisableDesktopWorkarounds() const;
private:
- explicit VisualViewport(FrameHost&);
+ explicit VisualViewport(Page&);
bool didSetScaleOrLocation(float scale, const FloatPoint& location);
@@ -266,11 +263,11 @@ class CORE_EXPORT VisualViewport final
LocalFrame* mainFrame() const;
Page& page() const {
- DCHECK(m_frameHost);
- return m_frameHost->page();
+ DCHECK(m_page);
+ return *m_page;
}
- Member<FrameHost> m_frameHost;
+ Member<Page> m_page;
std::unique_ptr<GraphicsLayer> m_rootTransformLayer;
std::unique_ptr<GraphicsLayer> m_innerViewportContainerLayer;
std::unique_ptr<GraphicsLayer> m_overscrollElasticityLayer;
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameHost.cpp ('k') | third_party/WebKit/Source/core/frame/VisualViewport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698