| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/debug/debugger.h" | 10 #include "base/debug/debugger.h" |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 factory->user_id() == window_server_->user_id_tracker()->active_id(); | 268 factory->user_id() == window_server_->user_id_tracker()->active_id(); |
| 269 display_root->root()->SetVisible(is_active); | 269 display_root->root()->SetVisible(is_active); |
| 270 display_root->window_manager_state()->window_tree()->AddRootForWindowManager( | 270 display_root->window_manager_state()->window_tree()->AddRootForWindowManager( |
| 271 display_root->root()); | 271 display_root->root()); |
| 272 } | 272 } |
| 273 | 273 |
| 274 ServerWindow* Display::GetRootWindow() { | 274 ServerWindow* Display::GetRootWindow() { |
| 275 return root_.get(); | 275 return root_.get(); |
| 276 } | 276 } |
| 277 | 277 |
| 278 bool Display::IsInHighContrastMode() { |
| 279 return window_server_->is_in_high_contrast_mode(); |
| 280 } |
| 281 |
| 278 void Display::OnEvent(const ui::Event& event) { | 282 void Display::OnEvent(const ui::Event& event) { |
| 279 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot(); | 283 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot(); |
| 280 if (display_root) | 284 if (display_root) |
| 281 display_root->window_manager_state()->ProcessEvent(event); | 285 display_root->window_manager_state()->ProcessEvent(event); |
| 282 window_server_ | 286 window_server_ |
| 283 ->GetUserActivityMonitorForUser( | 287 ->GetUserActivityMonitorForUser( |
| 284 window_server_->user_id_tracker()->active_id()) | 288 window_server_->user_id_tracker()->active_id()) |
| 285 ->OnUserActivity(); | 289 ->OnUserActivity(); |
| 286 } | 290 } |
| 287 | 291 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 } | 414 } |
| 411 | 415 |
| 412 void Display::OnWindowManagerWindowTreeFactoryReady( | 416 void Display::OnWindowManagerWindowTreeFactoryReady( |
| 413 WindowManagerWindowTreeFactory* factory) { | 417 WindowManagerWindowTreeFactory* factory) { |
| 414 if (!binding_) | 418 if (!binding_) |
| 415 CreateWindowManagerDisplayRootFromFactory(factory); | 419 CreateWindowManagerDisplayRootFromFactory(factory); |
| 416 } | 420 } |
| 417 | 421 |
| 418 } // namespace ws | 422 } // namespace ws |
| 419 } // namespace ui | 423 } // namespace ui |
| OLD | NEW |