Chromium Code Reviews| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 205 observers_.RemoveObserver(observer); | 205 observers_.RemoveObserver(observer); |
| 206 } | 206 } |
| 207 | 207 |
| 208 display::mojom::DisplayController* WindowManager::GetDisplayController() { | 208 display::mojom::DisplayController* WindowManager::GetDisplayController() { |
| 209 return display_controller_ ? display_controller_.get() : nullptr; | 209 return display_controller_ ? display_controller_.get() : nullptr; |
| 210 } | 210 } |
| 211 | 211 |
| 212 RootWindowController* WindowManager::CreateRootWindowController( | 212 RootWindowController* WindowManager::CreateRootWindowController( |
| 213 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host, | 213 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host, |
| 214 const display::Display& display) { | 214 const display::Display& display) { |
| 215 window_tree_host->InitCompositor(); | 215 window_tree_host->InitHost(); |
|
sky
2016/12/06 17:58:02
Should we do this in WindowTreeClient::OnWmNewDisp
mfomitchev
2016/12/06 18:01:18
Ok, yeah, that would make sense. I'll do it in htt
| |
| 216 // TODO(sky): this is temporary, should use RootWindowController directly. | 216 // TODO(sky): this is temporary, should use RootWindowController directly. |
| 217 aura::client::SetCaptureClient(window_tree_host->window(), | 217 aura::client::SetCaptureClient(window_tree_host->window(), |
| 218 wm_state_->capture_controller()); | 218 wm_state_->capture_controller()); |
| 219 aura::client::SetFocusClient(window_tree_host->window(), | 219 aura::client::SetFocusClient(window_tree_host->window(), |
| 220 focus_controller_.get()); | 220 focus_controller_.get()); |
| 221 aura::client::SetActivationClient(window_tree_host->window(), | 221 aura::client::SetActivationClient(window_tree_host->window(), |
| 222 focus_controller_.get()); | 222 focus_controller_.get()); |
| 223 aura::client::SetEventClient(window_tree_host->window(), event_client_.get()); | 223 aura::client::SetEventClient(window_tree_host->window(), event_client_.get()); |
| 224 aura::client::SetScreenPositionClient(window_tree_host->window(), | 224 aura::client::SetScreenPositionClient(window_tree_host->window(), |
| 225 screen_position_controller_.get()); | 225 screen_position_controller_.get()); |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 503 | 503 |
| 504 void WindowManager::OnWindowInitialized(aura::Window* window) { | 504 void WindowManager::OnWindowInitialized(aura::Window* window) { |
| 505 // This ensures WmWindowAura won't be called before WmWindowMus. This is | 505 // This ensures WmWindowAura won't be called before WmWindowMus. This is |
| 506 // important as if WmWindowAura::Get() is called first, then WmWindowAura | 506 // important as if WmWindowAura::Get() is called first, then WmWindowAura |
| 507 // would be created, not WmWindowMus. | 507 // would be created, not WmWindowMus. |
| 508 WmWindowMus::Get(window); | 508 WmWindowMus::Get(window); |
| 509 } | 509 } |
| 510 | 510 |
| 511 } // namespace mus | 511 } // namespace mus |
| 512 } // namespace ash | 512 } // namespace ash |
| OLD | NEW |