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

Unified Diff: third_party/WebKit/Source/web/ChromeClientImpl.cpp

Issue 2177333002: Move setWindowRect and windowRect calls from WebViewClient to WebWidgetClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: switch to refs Created 4 years, 4 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/web/ChromeClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
index a419836a15b2f6fc9875f53c84e1b0189ab0cd4e..47dc1fbf2292106d213928f9ca31439b71e48397 100644
--- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
@@ -185,13 +185,14 @@ void ChromeClientImpl::chromeDestroyed()
// Our lifetime is bound to the WebViewImpl.
}
-void ChromeClientImpl::setWindowRect(const IntRect& r)
+void ChromeClientImpl::setWindowRect(const IntRect& r, LocalFrame& frame)
{
- if (m_webView->client())
- m_webView->client()->setWindowRect(r);
+ DCHECK_EQ(&frame, m_webView->mainFrameImpl()->frame());
+ WebWidgetClient* client = WebLocalFrameImpl::fromFrame(&frame)->frameWidget()->client();
+ client->setWindowRect(r);
}
-IntRect ChromeClientImpl::windowRect()
+IntRect ChromeClientImpl::rootWindowRect()
{
WebRect rect;
if (m_webView->client()) {
@@ -211,7 +212,7 @@ IntRect ChromeClientImpl::pageRect()
// We hide the details of the window's border thickness from the web page by
// simple re-using the window position here. So, from the point-of-view of
// the web page, the window has no border.
- return windowRect();
+ return rootWindowRect();
}
void ChromeClientImpl::focus()
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.h ('k') | third_party/WebKit/Source/web/WebPagePopupImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698