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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 } | 64 } |
65 } | 65 } |
66 | 66 |
67 void Display::Init(const display::ViewportMetrics& metrics, | 67 void Display::Init(const display::ViewportMetrics& metrics, |
68 std::unique_ptr<DisplayBinding> binding) { | 68 std::unique_ptr<DisplayBinding> binding) { |
69 binding_ = std::move(binding); | 69 binding_ = std::move(binding); |
70 display_manager()->AddDisplay(this); | 70 display_manager()->AddDisplay(this); |
71 | 71 |
72 CreateRootWindow(metrics.bounds_in_pixels.size()); | 72 CreateRootWindow(metrics.bounds_in_pixels.size()); |
73 | 73 |
74 platform_display_ = PlatformDisplay::Create(root_.get(), metrics); | 74 platform_display_ = PlatformDisplay::Create( |
| 75 root_.get(), metrics, window_server_->GetResourceRunner(), |
| 76 window_server_->GetImageCursorsWeakPtr()); |
75 platform_display_->Init(this); | 77 platform_display_->Init(this); |
76 } | 78 } |
77 | 79 |
78 int64_t Display::GetId() const { | 80 int64_t Display::GetId() const { |
79 // TODO(tonikitoo): Implement a different ID for external window mode. | 81 // TODO(tonikitoo): Implement a different ID for external window mode. |
80 return display_.id(); | 82 return display_.id(); |
81 } | 83 } |
82 | 84 |
83 void Display::SetDisplay(const display::Display& display) { | 85 void Display::SetDisplay(const display::Display& display) { |
84 display_ = display; | 86 display_ = display; |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 | 419 |
418 UserActivityMonitor* activity_monitor = | 420 UserActivityMonitor* activity_monitor = |
419 window_server_->GetUserActivityMonitorForUser( | 421 window_server_->GetUserActivityMonitorForUser( |
420 window_server_->user_id_tracker()->active_id()); | 422 window_server_->user_id_tracker()->active_id()); |
421 activity_monitor->OnUserActivity(); | 423 activity_monitor->OnUserActivity(); |
422 return EventDispatchDetails(); | 424 return EventDispatchDetails(); |
423 } | 425 } |
424 | 426 |
425 } // namespace ws | 427 } // namespace ws |
426 } // namespace ui | 428 } // namespace ui |
OLD | NEW |