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

Side by Side Diff: ash/mus/bridge/wm_root_window_controller_mus.cc

Issue 2297893002: Merges RootWindowControllerCommon into WmRootWindowController (Closed)
Patch Set: feedback 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 unified diff | Download patch
« no previous file with comments | « ash/mus/bridge/wm_root_window_controller_mus.h ('k') | ash/mus/root_window_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/mus/bridge/wm_root_window_controller_mus.h" 5 #include "ash/mus/bridge/wm_root_window_controller_mus.h"
6 6
7 #include "ash/common/wm/workspace/workspace_layout_manager.h"
8 #include "ash/common/wm/workspace/workspace_layout_manager_backdrop_delegate.h"
9 #include "ash/common/wm_root_window_controller_observer.h" 7 #include "ash/common/wm_root_window_controller_observer.h"
10 #include "ash/mus/bridge/wm_shelf_mus.h" 8 #include "ash/mus/bridge/wm_shelf_mus.h"
11 #include "ash/mus/bridge/wm_shell_mus.h" 9 #include "ash/mus/bridge/wm_shell_mus.h"
12 #include "ash/mus/bridge/wm_window_mus.h" 10 #include "ash/mus/bridge/wm_window_mus.h"
13 #include "ash/mus/container_ids.h" 11 #include "ash/mus/container_ids.h"
14 #include "ash/mus/root_window_controller.h" 12 #include "ash/mus/root_window_controller.h"
15 #include "ash/mus/window_manager.h" 13 #include "ash/mus/window_manager.h"
16 #include "services/ui/public/cpp/window.h" 14 #include "services/ui/public/cpp/window.h"
17 #include "services/ui/public/cpp/window_property.h" 15 #include "services/ui/public/cpp/window_property.h"
18 #include "services/ui/public/cpp/window_tree_client.h" 16 #include "services/ui/public/cpp/window_tree_client.h"
(...skipping 10 matching lines...) Expand all
29 nullptr); 27 nullptr);
30 28
31 } // namespace 29 } // namespace
32 30
33 namespace ash { 31 namespace ash {
34 namespace mus { 32 namespace mus {
35 33
36 WmRootWindowControllerMus::WmRootWindowControllerMus( 34 WmRootWindowControllerMus::WmRootWindowControllerMus(
37 WmShellMus* shell, 35 WmShellMus* shell,
38 RootWindowController* root_window_controller) 36 RootWindowController* root_window_controller)
39 : shell_(shell), root_window_controller_(root_window_controller) { 37 : WmRootWindowController(WmWindowMus::Get(root_window_controller->root())),
38 shell_(shell),
39 root_window_controller_(root_window_controller) {
40 shell_->AddRootWindowController(this); 40 shell_->AddRootWindowController(this);
41 root_window_controller_->root()->SetLocalProperty(kWmRootWindowControllerKey, 41 root_window_controller_->root()->SetLocalProperty(kWmRootWindowControllerKey,
42 this); 42 this);
43 } 43 }
44 44
45 WmRootWindowControllerMus::~WmRootWindowControllerMus() { 45 WmRootWindowControllerMus::~WmRootWindowControllerMus() {
46 shell_->RemoveRootWindowController(this); 46 shell_->RemoveRootWindowController(this);
47 } 47 }
48 48
49 // static 49 // static
(...skipping 27 matching lines...) Expand all
77 } 77 }
78 78
79 bool WmRootWindowControllerMus::HasShelf() { 79 bool WmRootWindowControllerMus::HasShelf() {
80 return GetShelf() != nullptr; 80 return GetShelf() != nullptr;
81 } 81 }
82 82
83 WmShell* WmRootWindowControllerMus::GetShell() { 83 WmShell* WmRootWindowControllerMus::GetShell() {
84 return shell_; 84 return shell_;
85 } 85 }
86 86
87 wm::WorkspaceWindowState WmRootWindowControllerMus::GetWorkspaceWindowState() {
88 NOTIMPLEMENTED();
89 return wm::WORKSPACE_WINDOW_STATE_DEFAULT;
90 }
91
92 void WmRootWindowControllerMus::SetMaximizeBackdropDelegate(
93 std::unique_ptr<WorkspaceLayoutManagerBackdropDelegate> delegate) {
94 root_window_controller_->workspace_layout_manager()
95 ->SetMaximizeBackdropDelegate(std::move(delegate));
96 }
97
98 AlwaysOnTopController* WmRootWindowControllerMus::GetAlwaysOnTopController() { 87 AlwaysOnTopController* WmRootWindowControllerMus::GetAlwaysOnTopController() {
99 return root_window_controller_->always_on_top_controller(); 88 return root_window_controller_->always_on_top_controller();
100 } 89 }
101 90
102 WmShelf* WmRootWindowControllerMus::GetShelf() { 91 WmShelf* WmRootWindowControllerMus::GetShelf() {
103 return root_window_controller_->wm_shelf(); 92 return root_window_controller_->wm_shelf();
104 } 93 }
105 94
106 WmWindow* WmRootWindowControllerMus::GetWindow() { 95 WmWindow* WmRootWindowControllerMus::GetWindow() {
107 return WmWindowMus::Get(root_window_controller_->root()); 96 return WmWindowMus::Get(root_window_controller_->root());
(...skipping 24 matching lines...) Expand all
132 121
133 gfx::Point WmRootWindowControllerMus::GetLastMouseLocationInRoot() { 122 gfx::Point WmRootWindowControllerMus::GetLastMouseLocationInRoot() {
134 gfx::Point location = root_window_controller_->window_manager() 123 gfx::Point location = root_window_controller_->window_manager()
135 ->window_tree_client() 124 ->window_tree_client()
136 ->GetCursorScreenPoint(); 125 ->GetCursorScreenPoint();
137 location -= 126 location -=
138 root_window_controller_->display().bounds().origin().OffsetFromOrigin(); 127 root_window_controller_->display().bounds().origin().OffsetFromOrigin();
139 return location; 128 return location;
140 } 129 }
141 130
142 void WmRootWindowControllerMus::AddObserver(
143 WmRootWindowControllerObserver* observer) {
144 observers_.AddObserver(observer);
145 }
146
147 void WmRootWindowControllerMus::RemoveObserver(
148 WmRootWindowControllerObserver* observer) {
149 observers_.RemoveObserver(observer);
150 }
151
152 } // namespace mus 131 } // namespace mus
153 } // namespace ash 132 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/wm_root_window_controller_mus.h ('k') | ash/mus/root_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698