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

Unified Diff: ash/common/wm_root_window_controller.h

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/common/wm/workspace_controller.cc ('k') | ash/common/wm_root_window_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm_root_window_controller.h
diff --git a/ash/common/wm_root_window_controller.h b/ash/common/wm_root_window_controller.h
index 792b01e742e725196b781d2bdf5980ed1e6414fc..c897fdd7e1ee17a70b423611196dbc79b452037d 100644
--- a/ash/common/wm_root_window_controller.h
+++ b/ash/common/wm_root_window_controller.h
@@ -7,6 +7,8 @@
#include "ash/ash_export.h"
#include "ash/common/wm/workspace/workspace_types.h"
+#include "base/macros.h"
+#include "base/observer_list.h"
#include "ui/views/widget/widget.h"
namespace gfx {
@@ -20,23 +22,34 @@ class WmShelf;
class WmShell;
class WmRootWindowControllerObserver;
class WmWindow;
-class WorkspaceLayoutManagerBackdropDelegate;
+class WorkspaceController;
+
+namespace wm {
+class RootWindowLayoutManager;
+}
// Provides state associated with a root of a window hierarchy.
class ASH_EXPORT WmRootWindowController {
public:
- virtual ~WmRootWindowController() {}
+ explicit WmRootWindowController(WmWindow* window);
+ virtual ~WmRootWindowController();
- virtual bool HasShelf() = 0;
+ wm::RootWindowLayoutManager* root_window_layout_manager() {
+ return root_window_layout_manager_;
+ }
- virtual WmShell* GetShell() = 0;
+ WorkspaceController* workspace_controller() {
+ return workspace_controller_.get();
+ }
- virtual wm::WorkspaceWindowState GetWorkspaceWindowState() = 0;
+ wm::WorkspaceWindowState GetWorkspaceWindowState();
- // TODO: remove when WorkspaceController moved to common:
- // http://crbug.com/624173.
- virtual void SetMaximizeBackdropDelegate(
- std::unique_ptr<WorkspaceLayoutManagerBackdropDelegate> delegate) = 0;
+ void AddObserver(WmRootWindowControllerObserver* observer);
+ void RemoveObserver(WmRootWindowControllerObserver* observer);
+
+ virtual bool HasShelf() = 0;
+
+ virtual WmShell* GetShell() = 0;
virtual AlwaysOnTopController* GetAlwaysOnTopController() = 0;
@@ -63,8 +76,29 @@ class ASH_EXPORT WmRootWindowController {
// coordinates. This may return a point outside the root window's bounds.
virtual gfx::Point GetLastMouseLocationInRoot() = 0;
- virtual void AddObserver(WmRootWindowControllerObserver* observer) = 0;
- virtual void RemoveObserver(WmRootWindowControllerObserver* observer) = 0;
+ protected:
+ // Creates the containers (WmWindows) used by the shell.
+ void CreateContainers();
+
+ // Creates the LayoutManagers for the windows created by CreateContainers().
+ void CreateLayoutManagers();
+
+ void DeleteWorkspaceController();
+
+ base::ObserverList<WmRootWindowControllerObserver>* observers() {
+ return &observers_;
+ }
+
+ private:
+ WmWindow* root_;
+
+ wm::RootWindowLayoutManager* root_window_layout_manager_;
+
+ std::unique_ptr<WorkspaceController> workspace_controller_;
+
+ base::ObserverList<WmRootWindowControllerObserver> observers_;
+
+ DISALLOW_COPY_AND_ASSIGN(WmRootWindowController);
};
} // namespace ash
« no previous file with comments | « ash/common/wm/workspace_controller.cc ('k') | ash/common/wm_root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698