Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: ash/aura/wm_root_window_controller_aura.cc

Issue 2335963002: Refactor: remove SetDisplayWorkAreaInsets calls. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/aura/wm_root_window_controller_aura.h ('k') | ash/common/shell_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0bb740fe290cc40c616c97bd878127047edba843..fdf83b7c46583eff2e8ea935730905ee9d5a8088 100644
--- a/ash/aura/wm_root_window_controller_aura.cc
+++ b/ash/aura/wm_root_window_controller_aura.cc
@@ -17,6 +17,10 @@
#include "ash/wm/workspace_controller.h"
#include "ui/aura/window.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"
@@ -35,10 +39,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
@@ -124,11 +130,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) {
@@ -150,4 +151,17 @@ void WmRootWindowControllerAura::OnShelfAlignmentChanged(
OnShelfAlignmentChanged());
}
+void WmRootWindowControllerAura::OnDisplayAdded(
+ const display::Display& display) {}
+
+void WmRootWindowControllerAura::OnDisplayRemoved(
+ const display::Display& display) {}
+
+void WmRootWindowControllerAura::OnDisplayMetricsChanged(
+ const display::Display& display,
+ uint32_t metrics) {
+ FOR_EACH_OBSERVER(WmRootWindowControllerObserver, observers_,
+ OnWorkAreaChanged());
+}
+
} // namespace ash
« no previous file with comments | « ash/aura/wm_root_window_controller_aura.h ('k') | ash/common/shell_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698