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

Unified Diff: third_party/WebKit/Source/core/dom/ViewportDescription.cpp

Issue 2730573003: Moved FrameHost::m_visualViewport to Page (Closed)
Patch Set: Fixed some compile errors on mac and android 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/dom/ViewportDescription.cpp
diff --git a/third_party/WebKit/Source/core/dom/ViewportDescription.cpp b/third_party/WebKit/Source/core/dom/ViewportDescription.cpp
index 826d5d396151325b3fdcd4c18d48d287ba736eaf..f7bcdae6b7cffcc6c3be31034c9b191dbd472141 100644
--- a/third_party/WebKit/Source/core/dom/ViewportDescription.cpp
+++ b/third_party/WebKit/Source/core/dom/ViewportDescription.cpp
@@ -30,11 +30,11 @@
#include "core/dom/ViewportDescription.h"
#include "core/dom/Document.h"
-#include "core/frame/FrameHost.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/Settings.h"
#include "core/frame/VisualViewport.h"
+#include "core/page/Page.h"
#include "platform/Histogram.h"
#include "platform/weborigin/KURL.h"
@@ -249,7 +249,7 @@ void ViewportDescription::reportMobilePageStats(
TypeCount
};
- if (!mainFrame || !mainFrame->host() || !mainFrame->view() ||
+ if (!mainFrame || !mainFrame->page() || !mainFrame->view() ||
!mainFrame->document())
return;
@@ -276,7 +276,7 @@ void ViewportDescription::reportMobilePageStats(
// width, we report the zoom level that we'd need to be at for the
// entire page to be visible.
int viewportWidth = maxWidth.intValue();
- int windowWidth = mainFrame->host()->visualViewport().size().width();
+ int windowWidth = mainFrame->page()->visualViewport().size().width();
int overviewZoomPercent =
100 * windowWidth / static_cast<float>(viewportWidth);
DEFINE_STATIC_LOCAL(SparseHistogram, overviewZoomHistogram,
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/frame/BrowserControls.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698