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

Unified Diff: ash/aura/wm_root_window_controller_aura.cc

Issue 2297893002: Merges RootWindowControllerCommon into WmRootWindowController (Closed)
Patch Set: feedback Created 4 years, 4 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/root_window_controller_common.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 cadc1327d23288ed2af9d6b610882d8a13cd289b..98f2dd71850684be4fb61c3247bacef384c1cc89 100644
--- a/ash/aura/wm_root_window_controller_aura.cc
+++ b/ash/aura/wm_root_window_controller_aura.cc
@@ -9,8 +9,6 @@
#include "ash/aura/wm_window_aura.h"
#include "ash/common/shelf/shelf.h"
#include "ash/common/shelf/shelf_widget.h"
-#include "ash/common/wm/workspace/workspace_layout_manager_backdrop_delegate.h"
-#include "ash/common/wm/workspace_controller.h"
#include "ash/common/wm_root_window_controller_observer.h"
#include "ash/display/window_tree_host_manager.h"
#include "ash/root_window_controller.h"
@@ -34,7 +32,9 @@ DEFINE_OWNED_WINDOW_PROPERTY_KEY(ash::WmRootWindowControllerAura,
WmRootWindowControllerAura::WmRootWindowControllerAura(
RootWindowController* root_window_controller)
- : root_window_controller_(root_window_controller) {
+ : WmRootWindowController(
+ WmWindowAura::Get(root_window_controller->GetRootWindow())),
+ root_window_controller_(root_window_controller) {
root_window_controller_->GetRootWindow()->SetProperty(
kWmRootWindowControllerKey, this);
WmShell::Get()->AddShellObserver(this);
@@ -75,18 +75,6 @@ WmShell* WmRootWindowControllerAura::GetShell() {
return WmShell::Get();
}
-wm::WorkspaceWindowState WmRootWindowControllerAura::GetWorkspaceWindowState() {
- if (!root_window_controller_->workspace_controller())
- return wm::WORKSPACE_WINDOW_STATE_DEFAULT;
- return root_window_controller_->workspace_controller()->GetWindowState();
-}
-
-void WmRootWindowControllerAura::SetMaximizeBackdropDelegate(
- std::unique_ptr<WorkspaceLayoutManagerBackdropDelegate> delegate) {
- root_window_controller_->workspace_controller()->SetMaximizeBackdropDelegate(
- std::move(delegate));
-}
-
AlwaysOnTopController* WmRootWindowControllerAura::GetAlwaysOnTopController() {
return root_window_controller_->always_on_top_controller();
}
@@ -127,23 +115,13 @@ gfx::Point WmRootWindowControllerAura::GetLastMouseLocationInRoot() {
->GetLastMouseLocationInRoot();
}
-void WmRootWindowControllerAura::AddObserver(
- WmRootWindowControllerObserver* observer) {
- observers_.AddObserver(observer);
-}
-
-void WmRootWindowControllerAura::RemoveObserver(
- WmRootWindowControllerObserver* observer) {
- observers_.RemoveObserver(observer);
-}
-
void WmRootWindowControllerAura::OnShelfAlignmentChanged(
WmWindow* root_window) {
if (WmWindowAura::GetAuraWindow(root_window) !=
root_window_controller_->GetRootWindow())
return;
- FOR_EACH_OBSERVER(WmRootWindowControllerObserver, observers_,
+ FOR_EACH_OBSERVER(WmRootWindowControllerObserver, *observers(),
OnShelfAlignmentChanged());
}
@@ -156,8 +134,8 @@ void WmRootWindowControllerAura::OnDisplayRemoved(
void WmRootWindowControllerAura::OnDisplayMetricsChanged(
const display::Display& display,
uint32_t metrics) {
- FOR_EACH_OBSERVER(WmRootWindowControllerObserver, observers_,
+ FOR_EACH_OBSERVER(WmRootWindowControllerObserver, *observers(),
OnWorkAreaChanged());
}
-} // namespace ash
+} // namespace ash
« no previous file with comments | « ash/aura/wm_root_window_controller_aura.h ('k') | ash/common/root_window_controller_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698