diff --git a/ash/display/window_tree_host_manager_unittest.cc b/ash/display/window_tree_host_manager_unittest.cc index 421a0c68dd4c3c..90725a6113e496 100644 --- a/ash/display/window_tree_host_manager_unittest.cc +++ b/ash/display/window_tree_host_manager_unittest.cc @@ -1489,7 +1489,8 @@ class RootWindowTestObserver : public aura::WindowObserver { void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override { shelf_display_bounds_ = ScreenUtil::GetDisplayBoundsWithShelf(window); } diff --git a/ash/magnifier/magnification_controller.cc b/ash/magnifier/magnification_controller.cc index a610020ef9cb75..68ac9e3673c889 100644 --- a/ash/magnifier/magnification_controller.cc +++ b/ash/magnifier/magnification_controller.cc @@ -140,7 +140,8 @@ class MagnificationControllerImpl : public MagnificationController, void OnWindowDestroying(aura::Window* root_window) override; void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; // Redraws the magnification window with the given origin position and the // given scale. Returns true if the window is changed; otherwise, false. @@ -566,7 +567,8 @@ void MagnificationControllerImpl::OnWindowDestroying( void MagnificationControllerImpl::OnWindowBoundsChanged( aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { // TODO(yoshiki): implement here. crbug.com/230979 } diff --git a/ash/wallpaper/wallpaper_widget_controller.cc b/ash/wallpaper/wallpaper_widget_controller.cc index 7a6ad82af472b1..d7f71b086ac9a2 100644 --- a/ash/wallpaper/wallpaper_widget_controller.cc +++ b/ash/wallpaper/wallpaper_widget_controller.cc @@ -108,7 +108,8 @@ void WallpaperWidgetController::RemoveObservers() { void WallpaperWidgetController::OnWindowBoundsChanged( aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { SetBounds(new_bounds); } diff --git a/ash/wallpaper/wallpaper_widget_controller.h b/ash/wallpaper/wallpaper_widget_controller.h index 0790fd0da39fc6..58df7423664a5d 100644 --- a/ash/wallpaper/wallpaper_widget_controller.h +++ b/ash/wallpaper/wallpaper_widget_controller.h @@ -53,7 +53,8 @@ class ASH_EXPORT WallpaperWidgetController : public views::WidgetObserver, // aura::WindowObserver: void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; views::Widget* widget_; diff --git a/ash/wm/lock_layout_manager.cc b/ash/wm/lock_layout_manager.cc index 21b5f3b8df89f8..60ffb58a188c6d 100644 --- a/ash/wm/lock_layout_manager.cc +++ b/ash/wm/lock_layout_manager.cc @@ -77,7 +77,8 @@ void LockLayoutManager::OnWindowDestroying(aura::Window* window) { void LockLayoutManager::OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { if (root_window_ == window) { const wm::WMEvent wm_event(wm::WM_EVENT_DISPLAY_BOUNDS_CHANGED); AdjustWindowsForWorkAreaChange(&wm_event); diff --git a/ash/wm/lock_layout_manager.h b/ash/wm/lock_layout_manager.h index bdaaa5cad9ce9e..32f47961d18d83 100644 --- a/ash/wm/lock_layout_manager.h +++ b/ash/wm/lock_layout_manager.h @@ -60,7 +60,8 @@ class ASH_EXPORT LockLayoutManager void OnWindowDestroying(aura::Window* window) override; void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; // ShellObserver: void OnVirtualKeyboardStateChanged(bool activated, diff --git a/ash/wm/overview/window_grid.cc b/ash/wm/overview/window_grid.cc index 93bc08ee32bff0..d54a5a030f3aef 100644 --- a/ash/wm/overview/window_grid.cc +++ b/ash/wm/overview/window_grid.cc @@ -597,7 +597,8 @@ void WindowGrid::OnWindowDestroying(aura::Window* window) { void WindowGrid::OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { // During preparation, window bounds can change. Ignore bounds // change notifications in this case; we'll reposition soon. if (!prepared_for_overview_) diff --git a/ash/wm/overview/window_grid.h b/ash/wm/overview/window_grid.h index 467933d309a8ff..9911b39b81e2f0 100644 --- a/ash/wm/overview/window_grid.h +++ b/ash/wm/overview/window_grid.h @@ -140,7 +140,8 @@ class ASH_EXPORT WindowGrid : public aura::WindowObserver, // TODO(flackr): Handle window bounds changed in WindowSelectorItem. void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; // wm::WindowStateObserver: void OnPostWindowStateTypeChange(wm::WindowState* window_state, diff --git a/ash/wm/resize_shadow.cc b/ash/wm/resize_shadow.cc index d73829e3416537..fae090293ac074 100644 --- a/ash/wm/resize_shadow.cc +++ b/ash/wm/resize_shadow.cc @@ -100,7 +100,8 @@ ResizeShadow::~ResizeShadow() { void ResizeShadow::OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { UpdateBoundsAndVisibility(); } diff --git a/ash/wm/resize_shadow.h b/ash/wm/resize_shadow.h index 3ebcf46c798a7a..0d73f19e40dbe1 100644 --- a/ash/wm/resize_shadow.h +++ b/ash/wm/resize_shadow.h @@ -30,7 +30,8 @@ class ResizeShadow : public aura::WindowObserver { // aura::WindowObserver: void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; void OnWindowHierarchyChanged(const HierarchyChangeParams& params) override; void OnWindowStackingChanged(aura::Window* window) override; diff --git a/ash/wm/root_window_layout_manager_unittest.cc b/ash/wm/root_window_layout_manager_unittest.cc index a8e7da7443f65e..62ced3f1516f55 100644 --- a/ash/wm/root_window_layout_manager_unittest.cc +++ b/ash/wm/root_window_layout_manager_unittest.cc @@ -18,7 +18,8 @@ class WindowDeleter : public aura::WindowObserver { // aura::WindowObserver:: void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override { delete target_; } diff --git a/ash/wm/system_wallpaper_controller.cc b/ash/wm/system_wallpaper_controller.cc index 1e07c2a9789afe..9517c0d8b7c0bc 100644 --- a/ash/wm/system_wallpaper_controller.cc +++ b/ash/wm/system_wallpaper_controller.cc @@ -33,7 +33,8 @@ void SystemWallpaperController::SetColor(SkColor color) { void SystemWallpaperController::OnWindowBoundsChanged( aura::Window* root, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { DCHECK_EQ(root_window_, root); layer_->SetBounds(gfx::Rect(root_window_->layer()->bounds().size())); } diff --git a/ash/wm/system_wallpaper_controller.h b/ash/wm/system_wallpaper_controller.h index b21426279035ac..09d03f705d4011 100644 --- a/ash/wm/system_wallpaper_controller.h +++ b/ash/wm/system_wallpaper_controller.h @@ -35,7 +35,8 @@ class SystemWallpaperController : public aura::WindowObserver { // aura::WindowObserver overrides: void OnWindowBoundsChanged(aura::Window* root, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; private: class HostContentLayerDelegate; diff --git a/ash/wm/tablet_mode/tablet_mode_window_manager.cc b/ash/wm/tablet_mode/tablet_mode_window_manager.cc index a10fa110c45b4a..18bd83d85d243f 100644 --- a/ash/wm/tablet_mode/tablet_mode_window_manager.cc +++ b/ash/wm/tablet_mode/tablet_mode_window_manager.cc @@ -159,7 +159,8 @@ void TabletModeWindowManager::OnWindowPropertyChanged(aura::Window* window, void TabletModeWindowManager::OnWindowBoundsChanged( aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { if (!IsContainerWindow(window)) return; // Reposition all non maximizeable windows. diff --git a/ash/wm/tablet_mode/tablet_mode_window_manager.h b/ash/wm/tablet_mode/tablet_mode_window_manager.h index c7c41e91dbd4cb..0bca08829d61dc 100644 --- a/ash/wm/tablet_mode/tablet_mode_window_manager.h +++ b/ash/wm/tablet_mode/tablet_mode_window_manager.h @@ -70,7 +70,8 @@ class ASH_EXPORT TabletModeWindowManager intptr_t old) override; void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; void OnWindowVisibilityChanged(aura::Window* window, bool visible) override; // display::DisplayObserver: diff --git a/ash/wm/window_dimmer.cc b/ash/wm/window_dimmer.cc index 13ad065406052d..27e7b6d9f359ad 100644 --- a/ash/wm/window_dimmer.cc +++ b/ash/wm/window_dimmer.cc @@ -59,7 +59,8 @@ void WindowDimmer::SetDimOpacity(float target_opacity) { void WindowDimmer::OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { if (window == parent_) window_->SetBounds(gfx::Rect(new_bounds.size())); } diff --git a/ash/wm/window_dimmer.h b/ash/wm/window_dimmer.h index 473e19cb2b4587..be912dcef21d04 100644 --- a/ash/wm/window_dimmer.h +++ b/ash/wm/window_dimmer.h @@ -38,7 +38,8 @@ class ASH_EXPORT WindowDimmer : public aura::WindowObserver { // aura::WindowObserver: void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; void OnWindowDestroying(aura::Window* window) override; void OnWindowHierarchyChanging(const HierarchyChangeParams& params) override; diff --git a/ash/wm/workspace/workspace_layout_manager.cc b/ash/wm/workspace/workspace_layout_manager.cc index 72904cdd617ad0..5d39628457e5c6 100644 --- a/ash/wm/workspace/workspace_layout_manager.cc +++ b/ash/wm/workspace/workspace_layout_manager.cc @@ -238,7 +238,8 @@ void WorkspaceLayoutManager::OnWindowDestroying(aura::Window* window) { void WorkspaceLayoutManager::OnWindowBoundsChanged( aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { if (root_window_ == window) { const wm::WMEvent wm_event(wm::WM_EVENT_DISPLAY_BOUNDS_CHANGED); AdjustAllWindowsBoundsForWorkAreaChange(&wm_event); diff --git a/ash/wm/workspace/workspace_layout_manager.h b/ash/wm/workspace/workspace_layout_manager.h index 69f0ebab343bea..840aef9d883ee0 100644 --- a/ash/wm/workspace/workspace_layout_manager.h +++ b/ash/wm/workspace/workspace_layout_manager.h @@ -72,7 +72,8 @@ class ASH_EXPORT WorkspaceLayoutManager void OnWindowDestroying(aura::Window* window) override; void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; // wm::ActivationChangeObserver overrides: void OnWindowActivating(ActivationReason reason, diff --git a/chrome/browser/chromeos/lock_screen_apps/first_app_run_toast_manager.cc b/chrome/browser/chromeos/lock_screen_apps/first_app_run_toast_manager.cc index f482fb6e2c2f95..cd952d2b10b1d9 100644 --- a/chrome/browser/chromeos/lock_screen_apps/first_app_run_toast_manager.cc +++ b/chrome/browser/chromeos/lock_screen_apps/first_app_run_toast_manager.cc @@ -104,7 +104,8 @@ void FirstAppRunToastManager::OnAppWindowActivated( void FirstAppRunToastManager::OnWindowBoundsChanged( aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { if (toast_widget_ && window == app_window_->GetNativeWindow()) AdjustToastWidgetBounds(); } diff --git a/chrome/browser/chromeos/lock_screen_apps/first_app_run_toast_manager.h b/chrome/browser/chromeos/lock_screen_apps/first_app_run_toast_manager.h index 5d44145df5dc93..065f09427e79d2 100644 --- a/chrome/browser/chromeos/lock_screen_apps/first_app_run_toast_manager.h +++ b/chrome/browser/chromeos/lock_screen_apps/first_app_run_toast_manager.h @@ -51,7 +51,8 @@ class FirstAppRunToastManager : public extensions::AppWindowRegistry::Observer, // aura::WindowObserver: void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; // extensions::AppWindowRegistry::Observer: void OnAppWindowActivated(extensions::AppWindow* app_window) override; diff --git a/chrome/browser/ui/ash/chrome_keyboard_ui.cc b/chrome/browser/ui/ash/chrome_keyboard_ui.cc index bf5638519806e8..8048ad9926b719 100644 --- a/chrome/browser/ui/ash/chrome_keyboard_ui.cc +++ b/chrome/browser/ui/ash/chrome_keyboard_ui.cc @@ -77,7 +77,8 @@ class WindowBoundsChangeObserver : public aura::WindowObserver { private: void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override { ui_->UpdateInsetsForWindow(window); } void OnWindowDestroyed(aura::Window* window) override { @@ -396,7 +397,8 @@ void ChromeKeyboardUI::ResetInsets() { void ChromeKeyboardUI::OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { SetShadowAroundKeyboard(); } diff --git a/chrome/browser/ui/ash/chrome_keyboard_ui.h b/chrome/browser/ui/ash/chrome_keyboard_ui.h index 2e05e2d11d909d..98bb397f38730a 100644 --- a/chrome/browser/ui/ash/chrome_keyboard_ui.h +++ b/chrome/browser/ui/ash/chrome_keyboard_ui.h @@ -79,7 +79,8 @@ class ChromeKeyboardUI : public keyboard::KeyboardUI, // aura::WindowObserver overrides: void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; void OnWindowDestroyed(aura::Window* window) override; void OnWindowParentChanged(aura::Window* window, aura::Window* parent) override; diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc index 905f21b21242d5..8e61d11ab5a3a6 100644 --- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc +++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc @@ -1279,7 +1279,8 @@ class TestWindowObserver : public aura::WindowObserver { void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override { resize_calls_++; } diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc index 952ba41423f148..b1a4e3552999e1 100644 --- a/components/exo/shell_surface.cc +++ b/components/exo/shell_surface.cc @@ -1042,7 +1042,8 @@ void ShellSurface::OnPostWindowStateTypeChange( void ShellSurface::OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { // TODO(domlaskowski): For BoundsMode::CLIENT, the configure callback does not // yet support resizing. See crbug.com/699746. if (bounds_mode_ == BoundsMode::CLIENT) diff --git a/components/exo/shell_surface.h b/components/exo/shell_surface.h index c81eb14dddf77a..5a01e9b5125871 100644 --- a/components/exo/shell_surface.h +++ b/components/exo/shell_surface.h @@ -273,7 +273,8 @@ class ShellSurface : public SurfaceTreeHost, // Overridden from aura::WindowObserver: void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; void OnWindowDestroying(aura::Window* window) override; // Overridden from wm::ActivationChangeObserver: diff --git a/components/ui_devtools/views/window_element.cc b/components/ui_devtools/views/window_element.cc index 537d022d920cc6..2213ffb445f80a 100644 --- a/components/ui_devtools/views/window_element.cc +++ b/components/ui_devtools/views/window_element.cc @@ -58,7 +58,8 @@ void WindowElement::OnWindowStackingChanged(aura::Window* window) { void WindowElement::OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { DCHECK_EQ(window_, window); delegate()->OnUIElementBoundsChanged(this); } diff --git a/components/ui_devtools/views/window_element.h b/components/ui_devtools/views/window_element.h index e2ad70d1846c36..06130ed872c549 100644 --- a/components/ui_devtools/views/window_element.h +++ b/components/ui_devtools/views/window_element.h @@ -29,7 +29,8 @@ class WindowElement : public aura::WindowObserver, public UIElement { void OnWindowStackingChanged(aura::Window* window) override; void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; // UIElement: std::vector> GetCustomAttributes() diff --git a/content/browser/media/capture/aura_window_capture_machine.cc b/content/browser/media/capture/aura_window_capture_machine.cc index da9f18dfa6df99..51134be0830996 100644 --- a/content/browser/media/capture/aura_window_capture_machine.cc +++ b/content/browser/media/capture/aura_window_capture_machine.cc @@ -407,7 +407,8 @@ void AuraWindowCaptureMachine::CopyOutputFinishedForVideo( void AuraWindowCaptureMachine::OnWindowBoundsChanged( aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(desktop_window_ && window == desktop_window_); diff --git a/content/browser/media/capture/aura_window_capture_machine.h b/content/browser/media/capture/aura_window_capture_machine.h index e8de893d92e901..d5bcc3faec21bf 100644 --- a/content/browser/media/capture/aura_window_capture_machine.h +++ b/content/browser/media/capture/aura_window_capture_machine.h @@ -45,7 +45,8 @@ class AuraWindowCaptureMachine : public media::VideoCaptureMachine, // Implements aura::WindowObserver. void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; void OnWindowDestroying(aura::Window* window) override; void OnWindowAddedToRootWindow(aura::Window* window) override; void OnWindowRemovingFromRootWindow(aura::Window* window, diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index ab38e0f07a7371..72fb290ddd21f0 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -362,7 +362,8 @@ class RenderWidgetHostViewAura::WindowAncestorObserver void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override { DCHECK(ancestors_.find(window) != ancestors_.end()); if (new_bounds.origin() != old_bounds.origin()) view_->HandleParentBoundsChanged(); diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc index 4f5ed61dd212d5..58a44d530aa6ad 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc @@ -449,7 +449,8 @@ class WebContentsViewAura::WindowObserver void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override { if (window == host_window_ || window == view_->window_.get()) { SendScreenRects(); if (old_bounds.origin() != new_bounds.origin()) { diff --git a/mash/simple_wm/move_loop.cc b/mash/simple_wm/move_loop.cc index 45d210a19475ef..1336e34d93a43a 100644 --- a/mash/simple_wm/move_loop.cc +++ b/mash/simple_wm/move_loop.cc @@ -223,7 +223,8 @@ void MoveLoop::OnWindowHierarchyChanged(const HierarchyChangeParams& params) { void MoveLoop::OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { DCHECK_EQ(window, target_); if (!changing_bounds_) Cancel(); diff --git a/mash/simple_wm/move_loop.h b/mash/simple_wm/move_loop.h index 333d043f9142d9..dd115bd916e606 100644 --- a/mash/simple_wm/move_loop.h +++ b/mash/simple_wm/move_loop.h @@ -90,7 +90,8 @@ class MoveLoop : public aura::WindowObserver { void OnWindowHierarchyChanged(const HierarchyChangeParams& params) override; void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; void OnWindowVisibilityChanged(aura::Window* window, bool visible) override; // The window this MoveLoop is acting on. |target_| is set to null if the diff --git a/services/ui/ws/window_manager_client_unittest.cc b/services/ui/ws/window_manager_client_unittest.cc index aadd8893bfc6ff..599334481f0c05 100644 --- a/services/ui/ws/window_manager_client_unittest.cc +++ b/services/ui/ws/window_manager_client_unittest.cc @@ -111,7 +111,8 @@ class BoundsChangeObserver : public aura::WindowObserver { // Overridden from WindowObserver: void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override { DCHECK_EQ(window, window_); EXPECT_TRUE(WindowServerTestBase::QuitRunLoop()); } diff --git a/ui/app_list/presenter/app_list_presenter_impl.cc b/ui/app_list/presenter/app_list_presenter_impl.cc index bcfef1192d4f3e..a766319bf805c2 100644 --- a/ui/app_list/presenter/app_list_presenter_impl.cc +++ b/ui/app_list/presenter/app_list_presenter_impl.cc @@ -277,9 +277,11 @@ void AppListPresenterImpl::OnWindowFocused(aura::Window* gained_focus, //////////////////////////////////////////////////////////////////////////////// // AppListPresenterImpl, aura::WindowObserver implementation: -void AppListPresenterImpl::OnWindowBoundsChanged(aura::Window* root, - const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { +void AppListPresenterImpl::OnWindowBoundsChanged( + aura::Window* root, + const gfx::Rect& old_bounds, + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { if (presenter_delegate_) presenter_delegate_->UpdateBounds(); } diff --git a/ui/app_list/presenter/app_list_presenter_impl.h b/ui/app_list/presenter/app_list_presenter_impl.h index 4cb66df78d7c96..18da63b5695207 100644 --- a/ui/app_list/presenter/app_list_presenter_impl.h +++ b/ui/app_list/presenter/app_list_presenter_impl.h @@ -109,7 +109,8 @@ class APP_LIST_PRESENTER_EXPORT AppListPresenterImpl // aura::WindowObserver overrides: void OnWindowBoundsChanged(aura::Window* root, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; // ui::ImplicitAnimationObserver overrides: void OnImplicitAnimationsCompleted() override; diff --git a/ui/arc/notification/arc_notification_content_view.cc b/ui/arc/notification/arc_notification_content_view.cc index 6e5f3077108a86..b34d56d5ed3089 100644 --- a/ui/arc/notification/arc_notification_content_view.cc +++ b/ui/arc/notification/arc_notification_content_view.cc @@ -679,7 +679,8 @@ void ArcNotificationContentView::GetAccessibleNodeData( void ArcNotificationContentView::OnWindowBoundsChanged( aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { if (in_layout_) return; diff --git a/ui/arc/notification/arc_notification_content_view.h b/ui/arc/notification/arc_notification_content_view.h index 545ed173f81e63..2178286451867b 100644 --- a/ui/arc/notification/arc_notification_content_view.h +++ b/ui/arc/notification/arc_notification_content_view.h @@ -89,7 +89,8 @@ class ArcNotificationContentView // aura::WindowObserver void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; void OnWindowDestroying(aura::Window* window) override; // ArcNotificationItem::Observer diff --git a/ui/aura/test/test_screen.cc b/ui/aura/test/test_screen.cc index 2f16addd50434d..d7796a672a5835 100644 --- a/ui/aura/test/test_screen.cc +++ b/ui/aura/test/test_screen.cc @@ -134,8 +134,10 @@ gfx::Transform TestScreen::GetUIScaleTransform() const { return ui_scale; } -void TestScreen::OnWindowBoundsChanged( - Window* window, const gfx::Rect& old_bounds, const gfx::Rect& new_bounds) { +void TestScreen::OnWindowBoundsChanged(Window* window, + const gfx::Rect& old_bounds, + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { DCHECK_EQ(host_->window(), window); display::Display display(GetPrimaryDisplay()); display.SetSize(gfx::ScaleToFlooredSize(new_bounds.size(), diff --git a/ui/aura/test/test_screen.h b/ui/aura/test/test_screen.h index 7f625d3b5d629d..abee5232168a5a 100644 --- a/ui/aura/test/test_screen.h +++ b/ui/aura/test/test_screen.h @@ -48,7 +48,8 @@ class TestScreen : public display::ScreenBase, public WindowObserver { // WindowObserver overrides: void OnWindowBoundsChanged(Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; void OnWindowDestroying(Window* window) override; // display::Screen overrides: diff --git a/ui/aura/window.cc b/ui/aura/window.cc index bc8c9b43cca10f..144c13d81821c4 100644 --- a/ui/aura/window.cc +++ b/ui/aura/window.cc @@ -1070,12 +1070,12 @@ void Window::OnLayerBoundsChanged(const gfx::Rect& old_bounds, if (delegate_) delegate_->OnBoundsChanged(old_bounds, bounds_); for (auto& observer : observers_) - observer.OnWindowBoundsChanged(this, old_bounds, bounds_); + observer.OnWindowBoundsChanged(this, old_bounds, bounds_, reason); } void Window::OnLayerOpacityChanged(ui::PropertyChangeReason reason) { for (WindowObserver& observer : observers_) - observer.OnWindowOpacityChanged(this); + observer.OnWindowOpacityChanged(this, reason); } bool Window::CanAcceptEvent(const ui::Event& event) { diff --git a/ui/aura/window_event_dispatcher.cc b/ui/aura/window_event_dispatcher.cc index 6a673a4fcdd060..a923a15fee8fbe 100644 --- a/ui/aura/window_event_dispatcher.cc +++ b/ui/aura/window_event_dispatcher.cc @@ -698,9 +698,11 @@ void WindowEventDispatcher::OnWindowVisibilityChanged(Window* window, OnWindowHidden(window, WINDOW_HIDDEN); } -void WindowEventDispatcher::OnWindowBoundsChanged(Window* window, - const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { +void WindowEventDispatcher::OnWindowBoundsChanged( + Window* window, + const gfx::Rect& old_bounds, + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { if (!host_->window()->Contains(window)) return; diff --git a/ui/aura/window_event_dispatcher.h b/ui/aura/window_event_dispatcher.h index 946d0b8150d11a..0ddf99f0076457 100644 --- a/ui/aura/window_event_dispatcher.h +++ b/ui/aura/window_event_dispatcher.h @@ -213,7 +213,8 @@ class AURA_EXPORT WindowEventDispatcher : public ui::EventProcessor, void OnWindowVisibilityChanged(Window* window, bool visible) override; void OnWindowBoundsChanged(Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; void OnWindowTransforming(Window* window) override; void OnWindowTransformed(Window* window) override; diff --git a/ui/aura/window_observer.h b/ui/aura/window_observer.h index 1ed168de7f1d09..d1cf751cde1554 100644 --- a/ui/aura/window_observer.h +++ b/ui/aura/window_observer.h @@ -8,6 +8,7 @@ #include "base/macros.h" #include "base/strings/string16.h" #include "ui/aura/aura_export.h" +#include "ui/compositor/property_change_reason.h" namespace gfx { class Rect; @@ -78,15 +79,26 @@ class AURA_EXPORT WindowObserver { // on. virtual void OnWindowVisibilityChanged(Window* window, bool visible) {} - // Invoked when SetBounds() is invoked on |window|. |old_bounds| and - // |new_bounds| are in parent coordinates. + // Invoked when the bounds of the |window|'s layer are set. |old_bounds| and + // |new_bounds| are in parent coordinates. |reason| indicates whether the + // bounds were set directly or by an animation. This will be called at every + // step of a bounds animation. The client can determine whether the animation + // is ending by calling window->layer()->GetAnimator()->IsAnimatingProperty( + // ui::LayerAnimationElement::BOUNDS). virtual void OnWindowBoundsChanged(Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) {} - - // Invoked when the opacity of the |window|'s layer changes. Can be invoked - // multiple times during animation. - virtual void OnWindowOpacityChanged(Window* window) {} + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) {} + + // Invoked when the opacity of the |window|'s layer is set. |reason| indicates + // whether the opacity was set directly or by an animation. This won't + // necessarily be called at every step of an animation. However, it will + // always be called before the first frame of the animation is rendered and + // when the animation ends. The client can determine whether the animation is + // ending by calling window->layer()->GetAnimator()->IsAnimatingProperty( + // ui::LayerAnimationElement::OPACITY). + virtual void OnWindowOpacityChanged(Window* window, + ui::PropertyChangeReason reason) {} // Invoked when SetTransform() is invoked on |window|. virtual void OnWindowTransforming(Window* window) {} diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc index 28286b9a755fbe..ef7d5cc169debc 100644 --- a/ui/aura/window_unittest.cc +++ b/ui/aura/window_unittest.cc @@ -1747,9 +1747,20 @@ class WindowObserverTest : public WindowTest, int changed_count; }; + struct WindowBoundsInfo { + int changed_count = 0; + Window* window = nullptr; + gfx::Rect old_bounds; + gfx::Rect new_bounds; + ui::PropertyChangeReason reason = + ui::PropertyChangeReason::NOT_FROM_ANIMATION; + }; + struct WindowOpacityInfo { int changed_count = 0; Window* window = nullptr; + ui::PropertyChangeReason reason = + ui::PropertyChangeReason::NOT_FROM_ANIMATION; }; WindowObserverTest() @@ -1765,6 +1776,10 @@ class WindowObserverTest : public WindowTest, return visibility_info_.get(); } + const WindowBoundsInfo& window_bounds_info() const { + return window_bounds_info_; + } + const WindowOpacityInfo& window_opacity_info() const { return window_opacity_info_; } @@ -1823,9 +1838,22 @@ class WindowObserverTest : public WindowTest, old_property_value_ = old; } - void OnWindowOpacityChanged(Window* window) override { + void OnWindowBoundsChanged(Window* window, + const gfx::Rect& old_bounds, + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override { + ++window_bounds_info_.changed_count; + window_bounds_info_.window = window; + window_bounds_info_.old_bounds = old_bounds; + window_bounds_info_.new_bounds = new_bounds; + window_bounds_info_.reason = reason; + } + + void OnWindowOpacityChanged(Window* window, + ui::PropertyChangeReason reason) override { ++window_opacity_info_.changed_count; window_opacity_info_.window = window; + window_opacity_info_.reason = reason; } int added_count_; @@ -1835,6 +1863,7 @@ class WindowObserverTest : public WindowTest, const void* property_key_; intptr_t old_property_value_; std::vector > transform_notifications_; + WindowBoundsInfo window_bounds_info_; WindowOpacityInfo window_opacity_info_; DISALLOW_COPY_AND_ASSIGN(WindowObserverTest); @@ -1963,14 +1992,91 @@ TEST_P(WindowObserverTest, PropertyChanged) { reinterpret_cast(NULL), -3), PropertyChangeInfoAndClear()); } +// Verify that WindowObserver::OnWindowBoundsChanged() is notified when the +// bounds of a Window's Layer change without an animation. +TEST_P(WindowObserverTest, WindowBoundsChanged) { + std::unique_ptr window(CreateTestWindowWithId(1, root_window())); + window->AddObserver(this); + const gfx::Rect initial_bounds = window->bounds(); + constexpr gfx::Rect kTargetBounds(10, 20, 30, 40); + window->layer()->SetBounds(kTargetBounds); + ASSERT_EQ(1, window_bounds_info().changed_count); + EXPECT_EQ(window.get(), window_bounds_info().window); + EXPECT_EQ(initial_bounds, window_bounds_info().old_bounds); + EXPECT_EQ(kTargetBounds, window_bounds_info().new_bounds); + EXPECT_EQ(ui::PropertyChangeReason::NOT_FROM_ANIMATION, + window_bounds_info().reason); +} + +// Verify that WindowObserver::OnWindowBoundsChanged() is notified at every step +// of a bounds animation. +TEST_P(WindowObserverTest, WindowBoundsChangedAnimation) { + std::unique_ptr window(CreateTestWindowWithId(1, root_window())); + window->AddObserver(this); + const gfx::Rect initial_bounds = window->bounds(); + constexpr gfx::Rect kTargetBounds(10, 20, 30, 40); + const gfx::Rect step_bounds = + gfx::Tween::RectValueBetween(0.5, initial_bounds, kTargetBounds); + + ui::ScopedAnimationDurationScaleMode scoped_animation_duration_scale_mode( + ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION); + ui::ScopedLayerAnimationSettings settings(window->layer()->GetAnimator()); + window->layer()->SetBounds(kTargetBounds); + ASSERT_EQ(0, window_opacity_info().changed_count); + + window->layer()->GetAnimator()->Step( + window->layer()->GetAnimator()->last_step_time() + + settings.GetTransitionDuration() / 2); + ASSERT_EQ(1, window_bounds_info().changed_count); + EXPECT_EQ(window.get(), window_bounds_info().window); + EXPECT_EQ(initial_bounds, window_bounds_info().old_bounds); + EXPECT_EQ(step_bounds, window_bounds_info().new_bounds); + EXPECT_EQ(ui::PropertyChangeReason::FROM_ANIMATION, + window_bounds_info().reason); + + window->layer()->GetAnimator()->StopAnimatingProperty( + ui::LayerAnimationElement::BOUNDS); + ASSERT_EQ(2, window_bounds_info().changed_count); + EXPECT_EQ(window.get(), window_bounds_info().window); + EXPECT_EQ(step_bounds, window_bounds_info().old_bounds); + EXPECT_EQ(kTargetBounds, window_bounds_info().new_bounds); + EXPECT_EQ(ui::PropertyChangeReason::FROM_ANIMATION, + window_bounds_info().reason); +} + // Verify that WindowObserver::OnWindowOpacityChanged() is notified when the -// opacity of a Window's Layer changes. +// opacity of a Window's Layer changes without an animation. TEST_P(WindowObserverTest, WindowOpacityChanged) { std::unique_ptr window(CreateTestWindowWithId(1, root_window())); window->AddObserver(this); window->layer()->SetOpacity(0.5f); ASSERT_EQ(1, window_opacity_info().changed_count); EXPECT_EQ(window.get(), window_opacity_info().window); + EXPECT_EQ(ui::PropertyChangeReason::NOT_FROM_ANIMATION, + window_opacity_info().reason); +} + +// Verify that WindowObserver::OnWindowOpacityChanged() is notified at the +// beginning and at the end of a threaded opacity animation. +TEST_P(WindowObserverTest, WindowOpacityChangedAnimation) { + std::unique_ptr window(CreateTestWindowWithId(1, root_window())); + window->AddObserver(this); + + ui::ScopedAnimationDurationScaleMode scoped_animation_duration_scale_mode( + ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION); + ui::ScopedLayerAnimationSettings settings(window->layer()->GetAnimator()); + window->layer()->SetOpacity(0.5f); + ASSERT_EQ(1, window_opacity_info().changed_count); + EXPECT_EQ(window.get(), window_opacity_info().window); + EXPECT_EQ(ui::PropertyChangeReason::FROM_ANIMATION, + window_opacity_info().reason); + + window->layer()->GetAnimator()->StopAnimatingProperty( + ui::LayerAnimationElement::OPACITY); + ASSERT_EQ(2, window_opacity_info().changed_count); + EXPECT_EQ(window.get(), window_opacity_info().window); + EXPECT_EQ(ui::PropertyChangeReason::FROM_ANIMATION, + window_opacity_info().reason); } TEST_P(WindowTest, AcquireLayer) { @@ -2339,7 +2445,8 @@ class BoundsChangedWindowObserver : public WindowObserver { void OnWindowBoundsChanged(Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override { root_set_ = window->GetRootWindow() != NULL; } diff --git a/ui/keyboard/keyboard_controller.cc b/ui/keyboard/keyboard_controller.cc index 08af41fd157852..71497dd4c3d0eb 100644 --- a/ui/keyboard/keyboard_controller.cc +++ b/ui/keyboard/keyboard_controller.cc @@ -435,9 +435,11 @@ void KeyboardController::OnWindowRemovingFromRootWindow(aura::Window* window, window->GetRootWindow()->RemoveObserver(this); } -void KeyboardController::OnWindowBoundsChanged(aura::Window* window, - const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { +void KeyboardController::OnWindowBoundsChanged( + aura::Window* window, + const gfx::Rect& old_bounds, + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { if (!window->IsRootWindow()) return; // Keep the same height when window resizes. It gets called when the screen diff --git a/ui/keyboard/keyboard_controller.h b/ui/keyboard/keyboard_controller.h index f873899bebb17a..33d2afcc9a39d0 100644 --- a/ui/keyboard/keyboard_controller.h +++ b/ui/keyboard/keyboard_controller.h @@ -180,7 +180,8 @@ class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver, aura::Window* new_root) override; void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; // InputMethodObserver overrides void OnBlur() override {} diff --git a/ui/views/accessibility/ax_window_obj_wrapper.cc b/ui/views/accessibility/ax_window_obj_wrapper.cc index 3dbef4ad48f831..0740078fcb6217 100644 --- a/ui/views/accessibility/ax_window_obj_wrapper.cc +++ b/ui/views/accessibility/ax_window_obj_wrapper.cc @@ -112,9 +112,11 @@ void AXWindowObjWrapper::OnWindowHierarchyChanged( AXAuraObjCache::GetInstance()->Remove(params.target, params.old_parent); } -void AXWindowObjWrapper::OnWindowBoundsChanged(aura::Window* window, - const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { +void AXWindowObjWrapper::OnWindowBoundsChanged( + aura::Window* window, + const gfx::Rect& old_bounds, + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { if (window != window_) return; diff --git a/ui/views/accessibility/ax_window_obj_wrapper.h b/ui/views/accessibility/ax_window_obj_wrapper.h index 49d82f1de5ec0d..5707a4348e9109 100644 --- a/ui/views/accessibility/ax_window_obj_wrapper.h +++ b/ui/views/accessibility/ax_window_obj_wrapper.h @@ -42,7 +42,8 @@ class AXWindowObjWrapper : public AXAuraObjWrapper, void OnWindowHierarchyChanged(const HierarchyChangeParams& params) override; void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; void OnWindowPropertyChanged(aura::Window* window, const void* key, intptr_t old) override; diff --git a/ui/views/controls/menu/display_change_listener_aura.cc b/ui/views/controls/menu/display_change_listener_aura.cc index 1872281cd97939..724bada87402cc 100644 --- a/ui/views/controls/menu/display_change_listener_aura.cc +++ b/ui/views/controls/menu/display_change_listener_aura.cc @@ -23,7 +23,8 @@ class AuraDisplayChangeListener // aura::WindowObserver overrides: void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; void OnWindowDestroying(aura::Window* window) override; private: @@ -49,7 +50,8 @@ AuraDisplayChangeListener::~AuraDisplayChangeListener() { void AuraDisplayChangeListener::OnWindowBoundsChanged( aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { menu_runner_->Cancel(); } diff --git a/ui/views/controls/native/native_view_host_aura.cc b/ui/views/controls/native/native_view_host_aura.cc index b25160cf536d02..6dd9aee9c0edd4 100644 --- a/ui/views/controls/native/native_view_host_aura.cc +++ b/ui/views/controls/native/native_view_host_aura.cc @@ -224,9 +224,11 @@ gfx::NativeCursor NativeViewHostAura::GetCursor(int x, int y) { return gfx::kNullCursor; } -void NativeViewHostAura::OnWindowBoundsChanged(aura::Window* window, - const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { +void NativeViewHostAura::OnWindowBoundsChanged( + aura::Window* window, + const gfx::Rect& old_bounds, + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { if (mask_) mask_->layer()->SetBounds(gfx::Rect(host_->native_view()->bounds().size())); } diff --git a/ui/views/controls/native/native_view_host_aura.h b/ui/views/controls/native/native_view_host_aura.h index 87e5c3710f703e..41a56cc63e4e22 100644 --- a/ui/views/controls/native/native_view_host_aura.h +++ b/ui/views/controls/native/native_view_host_aura.h @@ -50,7 +50,8 @@ class NativeViewHostAura : public NativeViewHostWrapper, void OnWindowDestroyed(aura::Window* window) override; void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; // Reparents the native view with the clipping window existing between it and // its old parent, so that the fast resize path works. diff --git a/ui/views/controls/native/native_view_host_aura_unittest.cc b/ui/views/controls/native/native_view_host_aura_unittest.cc index 7399c849dd02ec..349d1a1b8c5363 100644 --- a/ui/views/controls/native/native_view_host_aura_unittest.cc +++ b/ui/views/controls/native/native_view_host_aura_unittest.cc @@ -63,7 +63,8 @@ class NativeViewHostWindowObserver : public aura::WindowObserver { void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override { EventDetails event; event.type = EVENT_BOUNDS_CHANGED; event.window = window; diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc index fbbafceab1cc17..d02c4f4929d11d 100644 --- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc +++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc @@ -147,7 +147,8 @@ class DesktopNativeWidgetTopLevelHandler : public aura::WindowObserver { void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override { // The position of the window may have changed. Hence we use SetBounds in // place of SetSize. We need to pass the bounds in screen coordinates to // the Widget::SetBounds function. diff --git a/ui/wm/core/shadow_controller.cc b/ui/wm/core/shadow_controller.cc index 31a4abe0ec7544..73dabab6cfe601 100644 --- a/ui/wm/core/shadow_controller.cc +++ b/ui/wm/core/shadow_controller.cc @@ -110,7 +110,8 @@ class ShadowController::Impl : intptr_t old) override; void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) override; + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) override; void OnWindowDestroyed(aura::Window* window) override; private: @@ -184,7 +185,8 @@ void ShadowController::Impl::OnWindowPropertyChanged(aura::Window* window, void ShadowController::Impl::OnWindowBoundsChanged( aura::Window* window, const gfx::Rect& old_bounds, - const gfx::Rect& new_bounds) { + const gfx::Rect& new_bounds, + ui::PropertyChangeReason reason) { Shadow* shadow = GetShadowForWindow(window); if (shadow) shadow->SetContentBounds(gfx::Rect(new_bounds.size()));