| 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 "services/ui/ws/display.h" | 5 #include "services/ui/ws/display.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 std::move(display_root_ptr); | 270 std::move(display_root_ptr); |
| 271 display_root->window_manager_state_ = | 271 display_root->window_manager_state_ = |
| 272 factory->window_tree()->window_manager_state(); | 272 factory->window_tree()->window_manager_state(); |
| 273 const bool is_active = | 273 const bool is_active = |
| 274 factory->user_id() == window_server_->user_id_tracker()->active_id(); | 274 factory->user_id() == window_server_->user_id_tracker()->active_id(); |
| 275 display_root->root()->SetVisible(is_active); | 275 display_root->root()->SetVisible(is_active); |
| 276 display_root->window_manager_state()->window_tree()->AddRootForWindowManager( | 276 display_root->window_manager_state()->window_tree()->AddRootForWindowManager( |
| 277 display_root->root()); | 277 display_root->root()); |
| 278 } | 278 } |
| 279 | 279 |
| 280 display::Display Display::GetDisplay() { |
| 281 return ToDisplay(); |
| 282 } |
| 283 |
| 280 ServerWindow* Display::GetRootWindow() { | 284 ServerWindow* Display::GetRootWindow() { |
| 281 return root_.get(); | 285 return root_.get(); |
| 282 } | 286 } |
| 283 | 287 |
| 284 bool Display::IsInHighContrastMode() { | 288 bool Display::IsInHighContrastMode() { |
| 285 return window_server_->IsActiveUserInHighContrastMode(); | 289 return window_server_->IsActiveUserInHighContrastMode(); |
| 286 } | 290 } |
| 287 | 291 |
| 288 void Display::OnEvent(const ui::Event& event) { | 292 void Display::OnEvent(const ui::Event& event) { |
| 289 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot(); | 293 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot(); |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 } | 424 } |
| 421 | 425 |
| 422 void Display::OnWindowManagerWindowTreeFactoryReady( | 426 void Display::OnWindowManagerWindowTreeFactoryReady( |
| 423 WindowManagerWindowTreeFactory* factory) { | 427 WindowManagerWindowTreeFactory* factory) { |
| 424 if (!binding_) | 428 if (!binding_) |
| 425 CreateWindowManagerDisplayRootFromFactory(factory); | 429 CreateWindowManagerDisplayRootFromFactory(factory); |
| 426 } | 430 } |
| 427 | 431 |
| 428 } // namespace ws | 432 } // namespace ws |
| 429 } // namespace ui | 433 } // namespace ui |
| OLD | NEW |