Chromium Code Reviews| 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 |
| } |