| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 258 |
| 259 ServerWindow* Display::GetRootWindow() { | 259 ServerWindow* Display::GetRootWindow() { |
| 260 return root_.get(); | 260 return root_.get(); |
| 261 } | 261 } |
| 262 | 262 |
| 263 void Display::OnAcceleratedWidgetAvailable() { | 263 void Display::OnAcceleratedWidgetAvailable() { |
| 264 display_manager()->OnDisplayAcceleratedWidgetAvailable(this); | 264 display_manager()->OnDisplayAcceleratedWidgetAvailable(this); |
| 265 InitWindowManagerDisplayRoots(); | 265 InitWindowManagerDisplayRoots(); |
| 266 } | 266 } |
| 267 | 267 |
| 268 bool Display::IsInHighContrastMode() { | |
| 269 return window_server_->IsActiveUserInHighContrastMode(); | |
| 270 } | |
| 271 | |
| 272 void Display::OnEvent(const ui::Event& event) { | 268 void Display::OnEvent(const ui::Event& event) { |
| 273 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot(); | 269 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot(); |
| 274 if (display_root) | 270 if (display_root) |
| 275 display_root->window_manager_state()->ProcessEvent(event, GetId()); | 271 display_root->window_manager_state()->ProcessEvent(event, GetId()); |
| 276 window_server_ | 272 window_server_ |
| 277 ->GetUserActivityMonitorForUser( | 273 ->GetUserActivityMonitorForUser( |
| 278 window_server_->user_id_tracker()->active_id()) | 274 window_server_->user_id_tracker()->active_id()) |
| 279 ->OnUserActivity(); | 275 ->OnUserActivity(); |
| 280 } | 276 } |
| 281 | 277 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 } | 377 } |
| 382 | 378 |
| 383 void Display::OnWindowManagerWindowTreeFactoryReady( | 379 void Display::OnWindowManagerWindowTreeFactoryReady( |
| 384 WindowManagerWindowTreeFactory* factory) { | 380 WindowManagerWindowTreeFactory* factory) { |
| 385 if (!binding_) | 381 if (!binding_) |
| 386 CreateWindowManagerDisplayRootFromFactory(factory); | 382 CreateWindowManagerDisplayRootFromFactory(factory); |
| 387 } | 383 } |
| 388 | 384 |
| 389 } // namespace ws | 385 } // namespace ws |
| 390 } // namespace ui | 386 } // namespace ui |
| OLD | NEW |