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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 | 255 |
256 root_.reset(window_server_->CreateServerWindow( | 256 root_.reset(window_server_->CreateServerWindow( |
257 display_manager()->GetAndAdvanceNextRootId(), | 257 display_manager()->GetAndAdvanceNextRootId(), |
258 ServerWindow::Properties())); | 258 ServerWindow::Properties())); |
259 root_->SetBounds(gfx::Rect(size)); | 259 root_->SetBounds(gfx::Rect(size)); |
260 root_->SetVisible(true); | 260 root_->SetVisible(true); |
261 focus_controller_ = base::MakeUnique<FocusController>(this, root_.get()); | 261 focus_controller_ = base::MakeUnique<FocusController>(this, root_.get()); |
262 focus_controller_->AddObserver(this); | 262 focus_controller_->AddObserver(this); |
263 } | 263 } |
264 | 264 |
| 265 display::Display Display::GetDisplay() { |
| 266 return ToDisplay(); |
| 267 } |
| 268 |
265 ServerWindow* Display::GetRootWindow() { | 269 ServerWindow* Display::GetRootWindow() { |
266 return root_.get(); | 270 return root_.get(); |
267 } | 271 } |
268 | 272 |
269 void Display::OnAcceleratedWidgetAvailable() { | 273 void Display::OnAcceleratedWidgetAvailable() { |
270 display_manager()->OnDisplayAcceleratedWidgetAvailable(this); | 274 display_manager()->OnDisplayAcceleratedWidgetAvailable(this); |
271 InitWindowManagerDisplayRoots(); | 275 InitWindowManagerDisplayRoots(); |
272 } | 276 } |
273 | 277 |
274 bool Display::IsInHighContrastMode() { | 278 bool Display::IsInHighContrastMode() { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 } | 384 } |
381 | 385 |
382 void Display::OnWindowManagerWindowTreeFactoryReady( | 386 void Display::OnWindowManagerWindowTreeFactoryReady( |
383 WindowManagerWindowTreeFactory* factory) { | 387 WindowManagerWindowTreeFactory* factory) { |
384 if (!binding_) | 388 if (!binding_) |
385 CreateWindowManagerDisplayRootFromFactory(factory); | 389 CreateWindowManagerDisplayRootFromFactory(factory); |
386 } | 390 } |
387 | 391 |
388 } // namespace ws | 392 } // namespace ws |
389 } // namespace ui | 393 } // namespace ui |
OLD | NEW |