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

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

Issue 2739703003: Last sets of tests that can move to common_unittests (Closed)
Patch Set: Created 3 years, 9 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
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_shell_mus.h" 5 #include "ash/mus/bridge/wm_shell_mus.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/accelerators/accelerator_controller.h" 9 #include "ash/common/accelerators/accelerator_controller.h"
10 #include "ash/common/key_event_watcher.h" 10 #include "ash/common/key_event_watcher.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 RootWindowController* WmShellMus::GetRootWindowControllerWithDisplayId( 157 RootWindowController* WmShellMus::GetRootWindowControllerWithDisplayId(
158 int64_t id) { 158 int64_t id) {
159 for (RootWindowController* root_window_controller : 159 for (RootWindowController* root_window_controller :
160 RootWindowController::root_window_controllers()) { 160 RootWindowController::root_window_controllers()) {
161 RootWindowSettings* settings = 161 RootWindowSettings* settings =
162 GetRootWindowSettings(root_window_controller->GetRootWindow()); 162 GetRootWindowSettings(root_window_controller->GetRootWindow());
163 DCHECK(settings); 163 DCHECK(settings);
164 if (settings->display_id == id) 164 if (settings->display_id == id)
165 return root_window_controller; 165 return root_window_controller;
166 } 166 }
167 NOTREACHED();
168 return nullptr; 167 return nullptr;
169 } 168 }
170 169
171 aura::WindowTreeClient* WmShellMus::window_tree_client() { 170 aura::WindowTreeClient* WmShellMus::window_tree_client() {
172 return window_manager_->window_tree_client(); 171 return window_manager_->window_tree_client();
173 } 172 }
174 173
175 void WmShellMus::Initialize( 174 void WmShellMus::Initialize(
176 const scoped_refptr<base::SequencedWorkerPool>& pool) { 175 const scoped_refptr<base::SequencedWorkerPool>& pool) {
177 WmShell::Initialize(pool); 176 WmShell::Initialize(pool);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 213
215 WmWindow* WmShellMus::GetPrimaryRootWindow() { 214 WmWindow* WmShellMus::GetPrimaryRootWindow() {
216 // NOTE: This is called before the RootWindowController has been created, so 215 // NOTE: This is called before the RootWindowController has been created, so
217 // it can't call through to RootWindowController to get all windows. 216 // it can't call through to RootWindowController to get all windows.
218 return primary_root_window_; 217 return primary_root_window_;
219 } 218 }
220 219
221 WmWindow* WmShellMus::GetRootWindowForDisplayId(int64_t display_id) { 220 WmWindow* WmShellMus::GetRootWindowForDisplayId(int64_t display_id) {
222 RootWindowController* root_window_controller = 221 RootWindowController* root_window_controller =
223 GetRootWindowControllerWithDisplayId(display_id); 222 GetRootWindowControllerWithDisplayId(display_id);
224 DCHECK(root_window_controller); 223 return root_window_controller
225 return WmWindow::Get(root_window_controller->GetRootWindow()); 224 ? WmWindow::Get(root_window_controller->GetRootWindow())
225 : nullptr;
226 } 226 }
227 227
228 const display::ManagedDisplayInfo& WmShellMus::GetDisplayInfo( 228 const display::ManagedDisplayInfo& WmShellMus::GetDisplayInfo(
229 int64_t display_id) const { 229 int64_t display_id) const {
230 // TODO(mash): implement http://crbug.com/622480. 230 // TODO(mash): implement http://crbug.com/622480.
231 NOTIMPLEMENTED(); 231 NOTIMPLEMENTED();
232 static display::ManagedDisplayInfo fake_info; 232 static display::ManagedDisplayInfo fake_info;
233 return fake_info; 233 return fake_info;
234 } 234 }
235 235
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 } 417 }
418 418
419 void WmShellMus::CreatePrimaryHost() {} 419 void WmShellMus::CreatePrimaryHost() {}
420 420
421 void WmShellMus::InitHosts(const ShellInitParams& init_params) { 421 void WmShellMus::InitHosts(const ShellInitParams& init_params) {
422 window_manager_->CreatePrimaryRootWindowController( 422 window_manager_->CreatePrimaryRootWindowController(
423 base::WrapUnique(init_params.primary_window_tree_host)); 423 base::WrapUnique(init_params.primary_window_tree_host));
424 } 424 }
425 } // namespace mus 425 } // namespace mus
426 } // namespace ash 426 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698