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

Unified Diff: chrome/browser/ui/web_contents_sizer.cc

Issue 2695093005: Remove RWHV::SetBounds() from the public API, and make comments clearer.
Patch Set: Resolve Android compile issue (missed one rename). Created 3 years, 10 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 | « no previous file | chrome/browser/ui/web_contents_sizer.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/web_contents_sizer.cc
diff --git a/chrome/browser/ui/web_contents_sizer.cc b/chrome/browser/ui/web_contents_sizer.cc
index 60580df80f5902a8ee29c03207153a0c5e8b26ee..afbde53adaf2cac66fd621a80a7dd082eff45936 100644
--- a/chrome/browser/ui/web_contents_sizer.cc
+++ b/chrome/browser/ui/web_contents_sizer.cc
@@ -16,11 +16,14 @@
void ResizeWebContents(content::WebContents* web_contents,
const gfx::Rect& new_bounds) {
#if defined(USE_AURA)
+ // TODO(miu): This is a layering violation, since only the RWHV should know
sky 2017/02/16 00:29:02 I don't understand this comment (or the one in the
miu 2017/02/17 00:09:02 A few reasons: 1. We're in the platform-agnostic
sky 2017/02/17 16:53:07 Could point on the first 1. This code should reall
miu 2017/02/17 23:50:59 Sounds like we agree with the change. I was about
+ // whether the resize operation is valid and, if so, execute it.
+ // http://crbug.com/73362
aura::Window* window = web_contents->GetNativeView();
window->SetBounds(gfx::Rect(window->bounds().origin(), new_bounds.size()));
#elif defined(OS_ANDROID)
content::RenderWidgetHostView* view = web_contents->GetRenderWidgetHostView();
if (view)
- view->SetBounds(new_bounds);
+ view->RequestTopLevelBoundsInScreen(new_bounds);
#endif
}
« no previous file with comments | « no previous file | chrome/browser/ui/web_contents_sizer.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698