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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2756383002: Change Frame to store a Page instead of a FrameHost. (Closed)
Patch Set: 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/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 15c04b101151f95a940d982304048f2a1b60282b..e4ed42d17d9e4ff546580d5854fd0c86d711e9bc 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -433,7 +433,7 @@ void LocalFrame::detach(FrameDetachType type) {
script().clearForClose();
setView(nullptr);
- m_host->page().eventHandlerRegistry().didRemoveAllEventHandlers(*domWindow());
+ m_page->eventHandlerRegistry().didRemoveAllEventHandlers(*domWindow());
domWindow()->frameDestroyed();
@@ -706,10 +706,10 @@ void LocalFrame::deviceScaleFactorChanged() {
}
double LocalFrame::devicePixelRatio() const {
- if (!m_host)
+ if (!m_page)
return 0;
- double ratio = m_host->page().deviceScaleFactorDeprecated();
+ double ratio = m_page->deviceScaleFactorDeprecated();
ratio *= pageZoomFactor();
return ratio;
}
@@ -848,7 +848,10 @@ inline LocalFrame::LocalFrame(LocalFrameClient* client,
FrameOwner* owner,
InterfaceProvider* interfaceProvider,
InterfaceRegistry* interfaceRegistry)
- : Frame(client, host, owner, LocalWindowProxyManager::create(*this)),
+ : Frame(client,
+ host ? &host->page() : nullptr,
+ owner,
+ LocalWindowProxyManager::create(*this)),
m_frameScheduler(page()->chromeClient().createFrameScheduler(
client->frameBlameContext())),
m_loader(this),
« no previous file with comments | « third_party/WebKit/Source/core/frame/Frame.cpp ('k') | third_party/WebKit/Source/core/frame/RemoteFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698