OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_manager.h" | 5 #include "services/ui/ws/display_manager.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "services/ui/display/platform_screen.h" | 8 #include "services/ui/display/platform_screen.h" |
9 #include "services/ui/ws/display.h" | 9 #include "services/ui/ws/display.h" |
10 #include "services/ui/ws/display_binding.h" | 10 #include "services/ui/ws/display_binding.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 return RootWindowId(id); | 132 return RootWindowId(id); |
133 } | 133 } |
134 | 134 |
135 void DisplayManager::OnDisplayAcceleratedWidgetAvailable(Display* display) { | 135 void DisplayManager::OnDisplayAcceleratedWidgetAvailable(Display* display) { |
136 DCHECK_NE(0u, pending_displays_.count(display)); | 136 DCHECK_NE(0u, pending_displays_.count(display)); |
137 DCHECK_EQ(0u, displays_.count(display)); | 137 DCHECK_EQ(0u, displays_.count(display)); |
138 const bool is_first_display = displays_.empty(); | 138 const bool is_first_display = displays_.empty(); |
139 displays_.insert(display); | 139 displays_.insert(display); |
140 pending_displays_.erase(display); | 140 pending_displays_.erase(display); |
141 if (is_first_display) | 141 if (is_first_display) |
142 window_server_->OnFirstDisplayReady(); | 142 window_server_->OnDisplayReady(display, is_first_display); |
143 } | 143 } |
144 | 144 |
145 void DisplayManager::OnActiveUserIdChanged(const UserId& previously_active_id, | 145 void DisplayManager::OnActiveUserIdChanged(const UserId& previously_active_id, |
146 const UserId& active_id) { | 146 const UserId& active_id) { |
147 WindowManagerState* previous_window_manager_state = | 147 WindowManagerState* previous_window_manager_state = |
148 window_server_->GetWindowManagerStateForUser(previously_active_id); | 148 window_server_->GetWindowManagerStateForUser(previously_active_id); |
149 gfx::Point mouse_location_on_screen; | 149 gfx::Point mouse_location_on_screen; |
150 if (previous_window_manager_state) { | 150 if (previous_window_manager_state) { |
151 mouse_location_on_screen = previous_window_manager_state->event_dispatcher() | 151 mouse_location_on_screen = previous_window_manager_state->event_dispatcher() |
152 ->mouse_pointer_last_location(); | 152 ->mouse_pointer_last_location(); |
(...skipping 26 matching lines...) Expand all Loading... |
179 NOTREACHED(); | 179 NOTREACHED(); |
180 } | 180 } |
181 | 181 |
182 void DisplayManager::OnDisplayModified(int64_t id, const gfx::Rect& bounds) { | 182 void DisplayManager::OnDisplayModified(int64_t id, const gfx::Rect& bounds) { |
183 // TODO(kylechar): Implement. | 183 // TODO(kylechar): Implement. |
184 NOTREACHED(); | 184 NOTREACHED(); |
185 } | 185 } |
186 | 186 |
187 } // namespace ws | 187 } // namespace ws |
188 } // namespace ui | 188 } // namespace ui |
OLD | NEW |