| OLD | NEW |
| 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 Loading... |
| 188 | 188 |
| 189 void WindowManager::CreateShell( | 189 void WindowManager::CreateShell( |
| 190 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) { | 190 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) { |
| 191 DCHECK(!created_shell_); | 191 DCHECK(!created_shell_); |
| 192 created_shell_ = true; | 192 created_shell_ = true; |
| 193 ShellInitParams init_params; | 193 ShellInitParams init_params; |
| 194 WmShellMus* wm_shell = new WmShellMus( | 194 WmShellMus* wm_shell = new WmShellMus( |
| 195 WmWindow::Get(window_tree_host->window()), | 195 WmWindow::Get(window_tree_host->window()), |
| 196 shell_delegate_for_test_ ? std::move(shell_delegate_for_test_) | 196 shell_delegate_for_test_ ? std::move(shell_delegate_for_test_) |
| 197 : base::MakeUnique<ShellDelegateMus>(connector_), | 197 : base::MakeUnique<ShellDelegateMus>(connector_), |
| 198 this, pointer_watcher_event_router_.get()); | 198 this, pointer_watcher_event_router_.get(), |
| 199 create_session_state_delegate_stub_for_test_); |
| 199 init_params.primary_window_tree_host = window_tree_host.release(); | 200 init_params.primary_window_tree_host = window_tree_host.release(); |
| 200 init_params.wm_shell = wm_shell; | 201 init_params.wm_shell = wm_shell; |
| 201 init_params.blocking_pool = blocking_pool_.get(); | 202 init_params.blocking_pool = blocking_pool_.get(); |
| 202 Shell::CreateInstance(init_params); | 203 Shell::CreateInstance(init_params); |
| 203 } | 204 } |
| 204 | 205 |
| 205 void WindowManager::CreateAndRegisterRootWindowController( | 206 void WindowManager::CreateAndRegisterRootWindowController( |
| 206 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host, | 207 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host, |
| 207 const display::Display& display, | 208 const display::Display& display, |
| 208 RootWindowController::RootWindowType root_window_type) { | 209 RootWindowController::RootWindowType root_window_type) { |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 bool WindowManager::IsWindowActive(aura::Window* window) { | 462 bool WindowManager::IsWindowActive(aura::Window* window) { |
| 462 return Shell::GetInstance()->activation_client()->GetActiveWindow() == window; | 463 return Shell::GetInstance()->activation_client()->GetActiveWindow() == window; |
| 463 } | 464 } |
| 464 | 465 |
| 465 void WindowManager::OnWmDeactivateWindow(aura::Window* window) { | 466 void WindowManager::OnWmDeactivateWindow(aura::Window* window) { |
| 466 Shell::GetInstance()->activation_client()->DeactivateWindow(window); | 467 Shell::GetInstance()->activation_client()->DeactivateWindow(window); |
| 467 } | 468 } |
| 468 | 469 |
| 469 } // namespace mus | 470 } // namespace mus |
| 470 } // namespace ash | 471 } // namespace ash |
| OLD | NEW |