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

Unified Diff: ash/common/wm_root_window_controller.cc

Issue 2297893002: Merges RootWindowControllerCommon into WmRootWindowController (Closed)
Patch Set: includes 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
Index: ash/common/wm_root_window_controller.cc
diff --git a/ash/common/root_window_controller_common.cc b/ash/common/wm_root_window_controller.cc
similarity index 92%
rename from ash/common/root_window_controller_common.cc
rename to ash/common/wm_root_window_controller.cc
index d14fda37c3cc730a02e0c6ab7eb422b888dc49ea..d50ec19fc45022bb346aac6cf6ef695f93caaa3d 100644
--- a/ash/common/root_window_controller_common.cc
+++ b/ash/common/wm_root_window_controller.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/common/root_window_controller_common.h"
+#include "ash/common/wm_root_window_controller.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/wm/root_window_layout_manager.h"
@@ -28,12 +28,27 @@ WmWindow* CreateContainer(int window_id, const char* name, WmWindow* parent) {
} // namespace
-RootWindowControllerCommon::RootWindowControllerCommon(WmWindow* root)
+WmRootWindowController::WmRootWindowController(WmWindow* root)
: root_(root), root_window_layout_(nullptr) {}
-RootWindowControllerCommon::~RootWindowControllerCommon() {}
+WmRootWindowController::~WmRootWindowController() {}
-void RootWindowControllerCommon::CreateContainers() {
+wm::WorkspaceWindowState WmRootWindowController::GetWorkspaceWindowState() {
+ return workspace_controller_ ? workspace_controller()->GetWindowState()
+ : wm::WORKSPACE_WINDOW_STATE_DEFAULT;
+}
+
+void WmRootWindowController::AddObserver(
+ WmRootWindowControllerObserver* observer) {
+ observers_.AddObserver(observer);
+}
+
+void WmRootWindowController::RemoveObserver(
+ WmRootWindowControllerObserver* observer) {
+ observers_.RemoveObserver(observer);
+}
+
+void WmRootWindowController::CreateContainers() {
// These containers are just used by PowerButtonController to animate groups
// of containers simultaneously without messing up the current transformations
// on those containers. These are direct children of the root window; all of
@@ -211,7 +226,7 @@ void RootWindowControllerCommon::CreateContainers() {
"PowerButtonAnimationContainer", root_);
}
-void RootWindowControllerCommon::CreateLayoutManagers() {
+void WmRootWindowController::CreateLayoutManagers() {
root_window_layout_ = new wm::RootWindowLayoutManager(root_);
root_->SetLayoutManager(base::WrapUnique(root_window_layout_));
@@ -220,7 +235,7 @@ void RootWindowControllerCommon::CreateLayoutManagers() {
workspace_controller_.reset(new WorkspaceController(default_container));
}
-void RootWindowControllerCommon::DeleteWorkspaceController() {
+void WmRootWindowController::DeleteWorkspaceController() {
workspace_controller_.reset();
}

Powered by Google App Engine
This is Rietveld 408576698