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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 window_server_->user_id_tracker()->active_id()) | 295 window_server_->user_id_tracker()->active_id()) |
296 ->OnUserActivity(); | 296 ->OnUserActivity(); |
297 } | 297 } |
298 | 298 |
299 void Display::OnNativeCaptureLost() { | 299 void Display::OnNativeCaptureLost() { |
300 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot(); | 300 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot(); |
301 if (display_root) | 301 if (display_root) |
302 display_root->window_manager_state()->SetCapture(nullptr, kInvalidClientId); | 302 display_root->window_manager_state()->SetCapture(nullptr, kInvalidClientId); |
303 } | 303 } |
304 | 304 |
305 void Display::OnDisplayClosed() { | |
306 display_manager()->DestroyDisplay(this); | |
307 } | |
308 | |
309 void Display::OnViewportMetricsChanged(const ViewportMetrics& old_metrics, | 305 void Display::OnViewportMetricsChanged(const ViewportMetrics& old_metrics, |
310 const ViewportMetrics& new_metrics) { | 306 const ViewportMetrics& new_metrics) { |
311 gfx::Rect new_bounds(new_metrics.bounds.size()); | 307 gfx::Rect new_bounds(new_metrics.bounds.size()); |
312 if (!root_) { | 308 if (!root_) { |
313 root_.reset(window_server_->CreateServerWindow( | 309 root_.reset(window_server_->CreateServerWindow( |
314 display_manager()->GetAndAdvanceNextRootId(), | 310 display_manager()->GetAndAdvanceNextRootId(), |
315 ServerWindow::Properties())); | 311 ServerWindow::Properties())); |
316 root_->SetBounds(new_bounds); | 312 root_->SetBounds(new_bounds); |
317 root_->SetVisible(true); | 313 root_->SetVisible(true); |
318 focus_controller_.reset(new FocusController(this, root_.get())); | 314 focus_controller_.reset(new FocusController(this, root_.get())); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 } | 418 } |
423 | 419 |
424 void Display::OnWindowManagerWindowTreeFactoryReady( | 420 void Display::OnWindowManagerWindowTreeFactoryReady( |
425 WindowManagerWindowTreeFactory* factory) { | 421 WindowManagerWindowTreeFactory* factory) { |
426 if (!binding_) | 422 if (!binding_) |
427 CreateWindowManagerDisplayRootFromFactory(factory); | 423 CreateWindowManagerDisplayRootFromFactory(factory); |
428 } | 424 } |
429 | 425 |
430 } // namespace ws | 426 } // namespace ws |
431 } // namespace ui | 427 } // namespace ui |
OLD | NEW |