Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(920)

Side by Side Diff: services/ui/ws/display_manager.cc

Issue 2330093003: Fix adding displays in mustash. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/ui/ws/display.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 DCHECK_LT(id, next_root_id_); 139 DCHECK_LT(id, next_root_id_);
140 return RootWindowId(id); 140 return RootWindowId(id);
141 } 141 }
142 142
143 void DisplayManager::OnDisplayAcceleratedWidgetAvailable(Display* display) { 143 void DisplayManager::OnDisplayAcceleratedWidgetAvailable(Display* display) {
144 DCHECK_NE(0u, pending_displays_.count(display)); 144 DCHECK_NE(0u, pending_displays_.count(display));
145 DCHECK_EQ(0u, displays_.count(display)); 145 DCHECK_EQ(0u, displays_.count(display));
146 const bool is_first_display = displays_.empty(); 146 const bool is_first_display = displays_.empty();
147 displays_.insert(display); 147 displays_.insert(display);
148 pending_displays_.erase(display); 148 pending_displays_.erase(display);
149 if (is_first_display) 149 window_server_->OnDisplayReady(display, is_first_display);
150 window_server_->OnDisplayReady(display, is_first_display);
151 } 150 }
152 151
153 void DisplayManager::OnActiveUserIdChanged(const UserId& previously_active_id, 152 void DisplayManager::OnActiveUserIdChanged(const UserId& previously_active_id,
154 const UserId& active_id) { 153 const UserId& active_id) {
155 WindowManagerState* previous_window_manager_state = 154 WindowManagerState* previous_window_manager_state =
156 window_server_->GetWindowManagerStateForUser(previously_active_id); 155 window_server_->GetWindowManagerStateForUser(previously_active_id);
157 gfx::Point mouse_location_on_screen; 156 gfx::Point mouse_location_on_screen;
158 if (previous_window_manager_state) { 157 if (previous_window_manager_state) {
159 mouse_location_on_screen = previous_window_manager_state->event_dispatcher() 158 mouse_location_on_screen = previous_window_manager_state->event_dispatcher()
160 ->mouse_pointer_last_location(); 159 ->mouse_pointer_last_location();
(...skipping 25 matching lines...) Expand all
186 // TODO(kylechar): What if the display is still pending? 185 // TODO(kylechar): What if the display is still pending?
187 } 186 }
188 187
189 void DisplayManager::OnDisplayModified(int64_t id, const gfx::Rect& bounds) { 188 void DisplayManager::OnDisplayModified(int64_t id, const gfx::Rect& bounds) {
190 // TODO(kylechar): Implement. 189 // TODO(kylechar): Implement.
191 NOTREACHED(); 190 NOTREACHED();
192 } 191 }
193 192
194 } // namespace ws 193 } // namespace ws
195 } // namespace ui 194 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/display.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698