| 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 "components/mus/ws/display.h" | 5 #include "components/mus/ws/display.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/debug/debugger.h" | 10 #include "base/debug/debugger.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "components/mus/common/types.h" | 12 #include "components/mus/common/types.h" |
| 13 #include "components/mus/ws/display_binding.h" | 13 #include "components/mus/ws/display_binding.h" |
| 14 #include "components/mus/ws/display_manager.h" | 14 #include "components/mus/ws/display_manager.h" |
| 15 #include "components/mus/ws/focus_controller.h" | 15 #include "components/mus/ws/focus_controller.h" |
| 16 #include "components/mus/ws/platform_display.h" | 16 #include "components/mus/ws/platform_display.h" |
| 17 #include "components/mus/ws/platform_display_init_params.h" | 17 #include "components/mus/ws/platform_display_init_params.h" |
| 18 #include "components/mus/ws/user_activity_monitor.h" |
| 18 #include "components/mus/ws/window_manager_display_root.h" | 19 #include "components/mus/ws/window_manager_display_root.h" |
| 19 #include "components/mus/ws/window_manager_state.h" | 20 #include "components/mus/ws/window_manager_state.h" |
| 20 #include "components/mus/ws/window_manager_window_tree_factory.h" | 21 #include "components/mus/ws/window_manager_window_tree_factory.h" |
| 21 #include "components/mus/ws/window_server.h" | 22 #include "components/mus/ws/window_server.h" |
| 22 #include "components/mus/ws/window_server_delegate.h" | 23 #include "components/mus/ws/window_server_delegate.h" |
| 23 #include "components/mus/ws/window_tree.h" | 24 #include "components/mus/ws/window_tree.h" |
| 24 #include "components/mus/ws/window_tree_binding.h" | 25 #include "components/mus/ws/window_tree_binding.h" |
| 25 #include "mojo/common/common_type_converters.h" | 26 #include "mojo/common/common_type_converters.h" |
| 26 #include "services/shell/public/interfaces/connector.mojom.h" | 27 #include "services/shell/public/interfaces/connector.mojom.h" |
| 27 #include "ui/base/cursor/cursor.h" | 28 #include "ui/base/cursor/cursor.h" |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 } | 272 } |
| 272 | 273 |
| 273 ServerWindow* Display::GetRootWindow() { | 274 ServerWindow* Display::GetRootWindow() { |
| 274 return root_.get(); | 275 return root_.get(); |
| 275 } | 276 } |
| 276 | 277 |
| 277 void Display::OnEvent(const ui::Event& event) { | 278 void Display::OnEvent(const ui::Event& event) { |
| 278 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot(); | 279 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot(); |
| 279 if (display_root) | 280 if (display_root) |
| 280 display_root->window_manager_state()->ProcessEvent(event); | 281 display_root->window_manager_state()->ProcessEvent(event); |
| 282 window_server_ |
| 283 ->GetUserActivityMonitorForUser( |
| 284 window_server_->user_id_tracker()->active_id()) |
| 285 ->OnUserActivity(); |
| 281 } | 286 } |
| 282 | 287 |
| 283 void Display::OnNativeCaptureLost() { | 288 void Display::OnNativeCaptureLost() { |
| 284 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot(); | 289 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot(); |
| 285 if (display_root) | 290 if (display_root) |
| 286 display_root->window_manager_state()->SetCapture(nullptr, kInvalidClientId); | 291 display_root->window_manager_state()->SetCapture(nullptr, kInvalidClientId); |
| 287 } | 292 } |
| 288 | 293 |
| 289 void Display::OnDisplayClosed() { | 294 void Display::OnDisplayClosed() { |
| 290 display_manager()->DestroyDisplay(this); | 295 display_manager()->DestroyDisplay(this); |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 } | 410 } |
| 406 | 411 |
| 407 void Display::OnWindowManagerWindowTreeFactoryReady( | 412 void Display::OnWindowManagerWindowTreeFactoryReady( |
| 408 WindowManagerWindowTreeFactory* factory) { | 413 WindowManagerWindowTreeFactory* factory) { |
| 409 if (!binding_) | 414 if (!binding_) |
| 410 CreateWindowManagerDisplayRootFromFactory(factory); | 415 CreateWindowManagerDisplayRootFromFactory(factory); |
| 411 } | 416 } |
| 412 | 417 |
| 413 } // namespace ws | 418 } // namespace ws |
| 414 } // namespace mus | 419 } // namespace mus |
| OLD | NEW |