| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 ->OnUserActivity(); | 288 ->OnUserActivity(); |
| 289 } | 289 } |
| 290 | 290 |
| 291 void Display::OnNativeCaptureLost() { | 291 void Display::OnNativeCaptureLost() { |
| 292 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot(); | 292 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot(); |
| 293 if (display_root) | 293 if (display_root) |
| 294 display_root->window_manager_state()->SetCapture(nullptr, kInvalidClientId); | 294 display_root->window_manager_state()->SetCapture(nullptr, kInvalidClientId); |
| 295 } | 295 } |
| 296 | 296 |
| 297 void Display::OnViewportMetricsChanged( | 297 void Display::OnViewportMetricsChanged( |
| 298 const display::ViewportMetrics& new_metrics) { | 298 const display::ViewportMetrics& metrics) { |
| 299 if (!root_ || root_->bounds().size() == new_metrics.bounds.size()) | 299 if (root_->bounds().size() == metrics.pixel_size) |
| 300 return; | 300 return; |
| 301 | 301 |
| 302 gfx::Rect new_bounds(new_metrics.bounds.size()); | 302 gfx::Rect new_bounds(metrics.pixel_size); |
| 303 root_->SetBounds(new_bounds); | 303 root_->SetBounds(new_bounds); |
| 304 for (auto& pair : window_manager_display_root_map_) | 304 for (auto& pair : window_manager_display_root_map_) |
| 305 pair.second->root()->SetBounds(new_bounds); | 305 pair.second->root()->SetBounds(new_bounds); |
| 306 } | 306 } |
| 307 | 307 |
| 308 bool Display::CanHaveActiveChildren(ServerWindow* window) const { | 308 bool Display::CanHaveActiveChildren(ServerWindow* window) const { |
| 309 return window && activation_parents_.Contains(window); | 309 return window && activation_parents_.Contains(window); |
| 310 } | 310 } |
| 311 | 311 |
| 312 void Display::OnActivationChanged(ServerWindow* old_active_window, | 312 void Display::OnActivationChanged(ServerWindow* old_active_window, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 } | 383 } |
| 384 | 384 |
| 385 void Display::OnWindowManagerWindowTreeFactoryReady( | 385 void Display::OnWindowManagerWindowTreeFactoryReady( |
| 386 WindowManagerWindowTreeFactory* factory) { | 386 WindowManagerWindowTreeFactory* factory) { |
| 387 if (!binding_) | 387 if (!binding_) |
| 388 CreateWindowManagerDisplayRootFromFactory(factory); | 388 CreateWindowManagerDisplayRootFromFactory(factory); |
| 389 } | 389 } |
| 390 | 390 |
| 391 } // namespace ws | 391 } // namespace ws |
| 392 } // namespace ui | 392 } // namespace ui |
| OLD | NEW |