| 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 } | 286 } |
| 287 | 287 |
| 288 void Display::CreateRootWindow(const gfx::Size& size) { | 288 void Display::CreateRootWindow(const gfx::Size& size) { |
| 289 DCHECK(!root_); | 289 DCHECK(!root_); |
| 290 | 290 |
| 291 root_.reset(window_server_->CreateServerWindow( | 291 root_.reset(window_server_->CreateServerWindow( |
| 292 display_manager()->GetAndAdvanceNextRootId(), | 292 display_manager()->GetAndAdvanceNextRootId(), |
| 293 ServerWindow::Properties())); | 293 ServerWindow::Properties())); |
| 294 root_->SetBounds(gfx::Rect(size)); | 294 root_->SetBounds(gfx::Rect(size)); |
| 295 root_->SetVisible(true); | 295 root_->SetVisible(true); |
| 296 focus_controller_.reset(new FocusController(this, root_.get())); | 296 focus_controller_ = base::MakeUnique<FocusController>(this, root_.get()); |
| 297 focus_controller_->AddObserver(this); | 297 focus_controller_->AddObserver(this); |
| 298 InitWindowManagerDisplayRootsIfNecessary(); | 298 InitWindowManagerDisplayRootsIfNecessary(); |
| 299 } | 299 } |
| 300 | 300 |
| 301 ServerWindow* Display::GetRootWindow() { | 301 ServerWindow* Display::GetRootWindow() { |
| 302 return root_.get(); | 302 return root_.get(); |
| 303 } | 303 } |
| 304 | 304 |
| 305 bool Display::IsInHighContrastMode() { | 305 bool Display::IsInHighContrastMode() { |
| 306 return window_server_->IsActiveUserInHighContrastMode(); | 306 return window_server_->IsActiveUserInHighContrastMode(); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 } | 430 } |
| 431 | 431 |
| 432 void Display::OnWindowManagerWindowTreeFactoryReady( | 432 void Display::OnWindowManagerWindowTreeFactoryReady( |
| 433 WindowManagerWindowTreeFactory* factory) { | 433 WindowManagerWindowTreeFactory* factory) { |
| 434 if (!binding_) | 434 if (!binding_) |
| 435 CreateWindowManagerDisplayRootFromFactory(factory); | 435 CreateWindowManagerDisplayRootFromFactory(factory); |
| 436 } | 436 } |
| 437 | 437 |
| 438 } // namespace ws | 438 } // namespace ws |
| 439 } // namespace ui | 439 } // namespace ui |
| OLD | NEW |