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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 } | 264 } |
265 | 265 |
266 display::Display Display::GetDisplay() { | 266 display::Display Display::GetDisplay() { |
267 return ToDisplay(); | 267 return ToDisplay(); |
268 } | 268 } |
269 | 269 |
270 ServerWindow* Display::GetRootWindow() { | 270 ServerWindow* Display::GetRootWindow() { |
271 return root_.get(); | 271 return root_.get(); |
272 } | 272 } |
273 | 273 |
274 ServerWindow* Display::GetActiveRootWindow() { | |
275 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot(); | |
276 if (display_root) | |
277 return display_root->root(); | |
278 return nullptr; | |
279 } | |
280 | |
281 void Display::OnAcceleratedWidgetAvailable() { | 274 void Display::OnAcceleratedWidgetAvailable() { |
282 display_manager()->OnDisplayAcceleratedWidgetAvailable(this); | 275 display_manager()->OnDisplayAcceleratedWidgetAvailable(this); |
283 InitWindowManagerDisplayRoots(); | 276 InitWindowManagerDisplayRoots(); |
284 } | 277 } |
285 | 278 |
286 bool Display::IsInHighContrastMode() { | 279 bool Display::IsInHighContrastMode() { |
287 return window_server_->IsActiveUserInHighContrastMode(); | 280 return window_server_->IsActiveUserInHighContrastMode(); |
288 } | 281 } |
289 | 282 |
290 void Display::OnEvent(const ui::Event& event) { | 283 void Display::OnEvent(const ui::Event& event) { |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 } | 385 } |
393 | 386 |
394 void Display::OnWindowManagerWindowTreeFactoryReady( | 387 void Display::OnWindowManagerWindowTreeFactoryReady( |
395 WindowManagerWindowTreeFactory* factory) { | 388 WindowManagerWindowTreeFactory* factory) { |
396 if (!binding_) | 389 if (!binding_) |
397 CreateWindowManagerDisplayRootFromFactory(factory); | 390 CreateWindowManagerDisplayRootFromFactory(factory); |
398 } | 391 } |
399 | 392 |
400 } // namespace ws | 393 } // namespace ws |
401 } // namespace ui | 394 } // namespace ui |
OLD | NEW |