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

Side by Side Diff: ash/mus/window_manager.cc

Issue 2741273002: chromeos: Promotes more from WmShell to Shell (Closed)
Patch Set: cleanup 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/window_manager.h" 5 #include "ash/mus/window_manager.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 RootWindowController::RootWindowType::PRIMARY); 188 RootWindowController::RootWindowType::PRIMARY);
189 } 189 }
190 190
191 void WindowManager::CreateShell( 191 void WindowManager::CreateShell(
192 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) { 192 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) {
193 DCHECK(!created_shell_); 193 DCHECK(!created_shell_);
194 created_shell_ = true; 194 created_shell_ = true;
195 ShellInitParams init_params; 195 ShellInitParams init_params;
196 WmShellMus* wm_shell = new WmShellMus( 196 WmShellMus* wm_shell = new WmShellMus(
197 WmWindow::Get(window_tree_host->window()), 197 WmWindow::Get(window_tree_host->window()),
198 shell_delegate_for_test_ ? std::move(shell_delegate_for_test_)
199 : base::MakeUnique<ShellDelegateMus>(connector_),
200 this, pointer_watcher_event_router_.get(), 198 this, pointer_watcher_event_router_.get(),
201 create_session_state_delegate_stub_for_test_); 199 create_session_state_delegate_stub_for_test_);
200 init_params.delegate = shell_delegate_for_test_
James Cook 2017/03/11 00:40:43 Can you add a comment by ShellInitParams::delegate
sky 2017/03/13 15:23:19 Done.
201 ? shell_delegate_for_test_.release()
202 : new ShellDelegateMus(connector_);
202 init_params.primary_window_tree_host = window_tree_host.release(); 203 init_params.primary_window_tree_host = window_tree_host.release();
203 init_params.wm_shell = wm_shell; 204 init_params.wm_shell = wm_shell;
204 init_params.blocking_pool = blocking_pool_.get(); 205 init_params.blocking_pool = blocking_pool_.get();
205 Shell::CreateInstance(init_params); 206 Shell::CreateInstance(init_params);
206 } 207 }
207 208
208 void WindowManager::CreateAndRegisterRootWindowController( 209 void WindowManager::CreateAndRegisterRootWindowController(
209 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host, 210 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host,
210 const display::Display& display, 211 const display::Display& display,
211 RootWindowController::RootWindowType root_window_type) { 212 RootWindowController::RootWindowType root_window_type) {
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 bool WindowManager::IsWindowActive(aura::Window* window) { 456 bool WindowManager::IsWindowActive(aura::Window* window) {
456 return Shell::GetInstance()->activation_client()->GetActiveWindow() == window; 457 return Shell::GetInstance()->activation_client()->GetActiveWindow() == window;
457 } 458 }
458 459
459 void WindowManager::OnWmDeactivateWindow(aura::Window* window) { 460 void WindowManager::OnWmDeactivateWindow(aura::Window* window) {
460 Shell::GetInstance()->activation_client()->DeactivateWindow(window); 461 Shell::GetInstance()->activation_client()->DeactivateWindow(window);
461 } 462 }
462 463
463 } // namespace mus 464 } // namespace mus
464 } // namespace ash 465 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698