Unnecessary override of OnWindowBoundsChanged in NativeWidgetMus::MusWindowObserver? |
||
Issue description
AFAICT:
void OnWindowBoundsChanging(mus::Window* window,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) override {
window_tree_host()->SetBounds(new_bounds);
}
handles updating the bounds of the StubWindow, so that the call to OnBoundsChanged() in OnWindowBoundsChanged() is unnecessary:
void OnWindowBoundsChanged(mus::Window* window,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) override {
platform_window_delegate()->OnBoundsChanged(new_bounds);
}
,
Jun 6 2016
Setting the bounds on StubWindow would normally trigger OnBoundsChanged() on WindowTreeHost*, but WindowTreeHostMus is not set as the delegate to the StubWindow, which is why we need to explicitly trigger the callback. I see that this is a bit confusing. Can we look into making WTHMus a delegate to StubWindow again?
,
Jun 6 2016
Uploaded candidate that reintroduces delegate: https://codereview.chromium.org/2040783002/#ps20001
,
Jun 6 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/72925754efce72c58d353db9d7c2b85855e6dcb7 commit 72925754efce72c58d353db9d7c2b85855e6dcb7 Author: markdittmer <markdittmer@chromium.org> Date: Mon Jun 06 21:18:35 2016 Drop unnecessary override of OnWindowBoundsChanged in NativeWidgetMus::MusWindowObserver R=sky@chromium.org BUG= 617315 Review-Url: https://codereview.chromium.org/2040783002 Cr-Commit-Position: refs/heads/master@{#398125} [modify] https://crrev.com/72925754efce72c58d353db9d7c2b85855e6dcb7/ui/platform_window/stub/BUILD.gn [modify] https://crrev.com/72925754efce72c58d353db9d7c2b85855e6dcb7/ui/platform_window/stub/stub_window.cc [modify] https://crrev.com/72925754efce72c58d353db9d7c2b85855e6dcb7/ui/platform_window/stub/stub_window.gyp [modify] https://crrev.com/72925754efce72c58d353db9d7c2b85855e6dcb7/ui/platform_window/stub/stub_window.h [modify] https://crrev.com/72925754efce72c58d353db9d7c2b85855e6dcb7/ui/views/mus/native_widget_mus.cc [modify] https://crrev.com/72925754efce72c58d353db9d7c2b85855e6dcb7/ui/views/mus/window_tree_host_mus.cc
,
Mar 7 2017
NativeWidgetMus has been nuked. So this is no longer relevant. |
||
►
Sign in to add a comment |
||
Comment 1 by markdittmer@chromium.org
, Jun 6 2016