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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 const display::Display& display, | 238 const display::Display& display, |
239 RootWindowController::RootWindowType root_window_type) { | 239 RootWindowController::RootWindowType root_window_type) { |
240 RootWindowSettings* root_window_settings = | 240 RootWindowSettings* root_window_settings = |
241 InitRootWindowSettings(window_tree_host->window()); | 241 InitRootWindowSettings(window_tree_host->window()); |
242 root_window_settings->display_id = display.id(); | 242 root_window_settings->display_id = display.id(); |
243 std::unique_ptr<RootWindowController> root_window_controller( | 243 std::unique_ptr<RootWindowController> root_window_controller( |
244 new RootWindowController(nullptr, window_tree_host.release())); | 244 new RootWindowController(nullptr, window_tree_host.release())); |
245 root_window_controller->Init(root_window_type); | 245 root_window_controller->Init(root_window_type); |
246 // TODO: To avoid lots of IPC AddActivationParent() should take an array. | 246 // TODO: To avoid lots of IPC AddActivationParent() should take an array. |
247 // http://crbug.com/682048. | 247 // http://crbug.com/682048. |
248 WmWindow* root_window = root_window_controller->GetWindow(); | 248 aura::Window* root_window = root_window_controller->GetRootWindow(); |
249 for (size_t i = 0; i < kNumActivatableShellWindowIds; ++i) { | 249 for (size_t i = 0; i < kNumActivatableShellWindowIds; ++i) { |
250 window_manager_client_->AddActivationParent( | 250 window_manager_client_->AddActivationParent( |
251 root_window->GetChildByShellWindowId(kActivatableShellWindowIds[i]) | 251 root_window->GetChildById(kActivatableShellWindowIds[i])); |
252 ->aura_window()); | |
253 } | 252 } |
254 root_window_controllers_.insert(std::move(root_window_controller)); | 253 root_window_controllers_.insert(std::move(root_window_controller)); |
255 } | 254 } |
256 | 255 |
257 void WindowManager::DestroyRootWindowController( | 256 void WindowManager::DestroyRootWindowController( |
258 RootWindowController* root_window_controller, | 257 RootWindowController* root_window_controller, |
259 bool in_shutdown) { | 258 bool in_shutdown) { |
260 if (!in_shutdown && root_window_controllers_.size() > 1) { | 259 if (!in_shutdown && root_window_controllers_.size() > 1) { |
261 DCHECK_NE(root_window_controller, GetPrimaryRootWindowController()); | 260 DCHECK_NE(root_window_controller, GetPrimaryRootWindowController()); |
262 root_window_controller->MoveWindowsTo( | 261 root_window_controller->MoveWindowsTo( |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 bool WindowManager::IsWindowActive(aura::Window* window) { | 561 bool WindowManager::IsWindowActive(aura::Window* window) { |
563 return Shell::Get()->activation_client()->GetActiveWindow() == window; | 562 return Shell::Get()->activation_client()->GetActiveWindow() == window; |
564 } | 563 } |
565 | 564 |
566 void WindowManager::OnWmDeactivateWindow(aura::Window* window) { | 565 void WindowManager::OnWmDeactivateWindow(aura::Window* window) { |
567 Shell::Get()->activation_client()->DeactivateWindow(window); | 566 Shell::Get()->activation_client()->DeactivateWindow(window); |
568 } | 567 } |
569 | 568 |
570 } // namespace mus | 569 } // namespace mus |
571 } // namespace ash | 570 } // namespace ash |
OLD | NEW |