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 |
274 void Display::OnAcceleratedWidgetAvailable() { | 281 void Display::OnAcceleratedWidgetAvailable() { |
275 display_manager()->OnDisplayAcceleratedWidgetAvailable(this); | 282 display_manager()->OnDisplayAcceleratedWidgetAvailable(this); |
276 InitWindowManagerDisplayRoots(); | 283 InitWindowManagerDisplayRoots(); |
277 } | 284 } |
278 | 285 |
279 bool Display::IsInHighContrastMode() { | 286 bool Display::IsInHighContrastMode() { |
280 return window_server_->IsActiveUserInHighContrastMode(); | 287 return window_server_->IsActiveUserInHighContrastMode(); |
281 } | 288 } |
282 | 289 |
283 void Display::OnEvent(const ui::Event& event) { | 290 void Display::OnEvent(const ui::Event& event) { |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 } | 392 } |
386 | 393 |
387 void Display::OnWindowManagerWindowTreeFactoryReady( | 394 void Display::OnWindowManagerWindowTreeFactoryReady( |
388 WindowManagerWindowTreeFactory* factory) { | 395 WindowManagerWindowTreeFactory* factory) { |
389 if (!binding_) | 396 if (!binding_) |
390 CreateWindowManagerDisplayRootFromFactory(factory); | 397 CreateWindowManagerDisplayRootFromFactory(factory); |
391 } | 398 } |
392 | 399 |
393 } // namespace ws | 400 } // namespace ws |
394 } // namespace ui | 401 } // namespace ui |
OLD | NEW |