Chromium Code Reviews| Index: ash/aura/wm_root_window_controller_aura.cc |
| diff --git a/ash/aura/wm_root_window_controller_aura.cc b/ash/aura/wm_root_window_controller_aura.cc |
| index 07ff348f228ccec35b14ff541fc84bc64985a94b..cf408eac8e17d145753dfba15b7d8d4f31d23bbb 100644 |
| --- a/ash/aura/wm_root_window_controller_aura.cc |
| +++ b/ash/aura/wm_root_window_controller_aura.cc |
| @@ -19,6 +19,7 @@ |
| #include "ui/aura/window_event_dispatcher.h" |
| #include "ui/aura/window_property.h" |
| #include "ui/aura/window_tree_host.h" |
| +#include "ui/display/screen.h" |
| #include "ui/events/event_targeter.h" |
| #include "ui/events/event_utils.h" |
| @@ -37,10 +38,12 @@ WmRootWindowControllerAura::WmRootWindowControllerAura( |
| root_window_controller_->GetRootWindow()->SetProperty( |
| kWmRootWindowControllerKey, this); |
| WmShell::Get()->AddShellObserver(this); |
| + display::Screen::GetScreen()->AddObserver(this); |
| } |
| WmRootWindowControllerAura::~WmRootWindowControllerAura() { |
| WmShell::Get()->RemoveShellObserver(this); |
| + display::Screen::GetScreen()->RemoveObserver(this); |
| } |
| // static |
| @@ -132,11 +135,6 @@ void WmRootWindowControllerAura::RemoveObserver( |
| observers_.RemoveObserver(observer); |
| } |
| -void WmRootWindowControllerAura::OnDisplayWorkAreaInsetsChanged() { |
| - FOR_EACH_OBSERVER(WmRootWindowControllerObserver, observers_, |
| - OnWorkAreaChanged()); |
| -} |
| - |
| void WmRootWindowControllerAura::OnFullscreenStateChanged( |
| bool is_fullscreen, |
| WmWindow* root_window) { |
| @@ -158,4 +156,17 @@ void WmRootWindowControllerAura::OnShelfAlignmentChanged( |
| OnShelfAlignmentChanged()); |
| } |
| +void WmRootWindowControllerAura::OnDisplayMetricsChanged( |
| + const display::Display& display, |
| + uint32_t metrics) { |
| + FOR_EACH_OBSERVER(WmRootWindowControllerObserver, observers_, |
| + OnWorkAreaChanged()); |
| +} |
| + |
| +void WmRootWindowControllerAura::OnDisplayAdded( |
| + const display::Display& display) {} |
| + |
| +void WmRootWindowControllerAura::OnDisplayRemoved( |
| + const display::Display& display) {} |
|
oshima
2016/07/26 20:53:03
nit: please keep the same order as in the header.
hariank
2016/07/26 22:05:16
Done.
|
| + |
| } // namespace ash |