Chromium Code Reviews| Index: ui/views/widget/desktop_aura/desktop_screen_position_client.cc |
| diff --git a/ui/views/widget/desktop_aura/desktop_screen_position_client.cc b/ui/views/widget/desktop_aura/desktop_screen_position_client.cc |
| index 6096b4e10797dd8fa0a299c5db14e4b3ca5040be..b6ed6e571a2fa571df179409425c303143ee9801 100644 |
| --- a/ui/views/widget/desktop_aura/desktop_screen_position_client.cc |
| +++ b/ui/views/widget/desktop_aura/desktop_screen_position_client.cc |
| @@ -38,10 +38,17 @@ void DesktopScreenPositionClient::SetBounds(aura::Window* window, |
| // TODO(jam): Use the 3rd parameter, |display|. |
| aura::Window* root = window->GetRootWindow(); |
| - // This method assumes that |window| does not have an associated |
| - // DesktopNativeWidgetAura. |
| internal::NativeWidgetPrivate* desktop_native_widget = |
| DesktopNativeWidgetAura::ForWindow(root); |
| + // The screen bounds request to the content_window_ should be interpreted as |
| + // a widget bounds change. |
| + if (desktop_native_widget && |
| + desktop_native_widget->GetNativeView() == window) { |
| + desktop_native_widget->GetWidget()->SetBounds(bounds); |
| + return; |
|
sadrul
2016/12/19 18:08:56
It looks like DesktopNativeWidgetAura::OnBoundsCha
oshima
2016/12/20 23:55:32
Did you mean DesktopNativeWidgetTopLevelHandler::O
|
| + } |
| + // The following logic assumes that |window| does not have an associated |
| + // DesktopNativeWidgetAura. |
|
Bret
2016/12/21 00:04:25
nit: since you're explicitly handling the dchecked
|
| DCHECK(!desktop_native_widget || |
| desktop_native_widget->GetNativeView() != window); |