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

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

Issue 2804403002: Adds ability for WindowManager to create display roots (Closed)
Patch Set: cleanup Created 3 years, 8 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.h ('k') | services/ui/ws/display_binding.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 void Display::OnWillDestroyTree(WindowTree* tree) { 175 void Display::OnWillDestroyTree(WindowTree* tree) {
176 for (auto it = window_manager_display_root_map_.begin(); 176 for (auto it = window_manager_display_root_map_.begin();
177 it != window_manager_display_root_map_.end(); ++it) { 177 it != window_manager_display_root_map_.end(); ++it) {
178 if (it->second->window_manager_state()->window_tree() == tree) { 178 if (it->second->window_manager_state()->window_tree() == tree) {
179 window_manager_display_root_map_.erase(it); 179 window_manager_display_root_map_.erase(it);
180 break; 180 break;
181 } 181 }
182 } 182 }
183 } 183 }
184 184
185 void Display::RemoveWindowManagerDisplayRoot(
186 WindowManagerDisplayRoot* display_root) {
187 for (auto it = window_manager_display_root_map_.begin();
188 it != window_manager_display_root_map_.end(); ++it) {
189 if (it->second == display_root) {
190 window_manager_display_root_map_.erase(it);
191 return;
192 }
193 }
194 NOTREACHED();
195 }
196
185 void Display::UpdateNativeCursor(mojom::CursorType cursor_id) { 197 void Display::UpdateNativeCursor(mojom::CursorType cursor_id) {
186 if (cursor_id != last_cursor_) { 198 if (cursor_id != last_cursor_) {
187 platform_display_->SetCursorById(cursor_id); 199 platform_display_->SetCursorById(cursor_id);
188 last_cursor_ = cursor_id; 200 last_cursor_ = cursor_id;
189 } 201 }
190 } 202 }
191 203
192 void Display::SetSize(const gfx::Size& size) { 204 void Display::SetSize(const gfx::Size& size) {
193 platform_display_->SetViewportSize(size); 205 platform_display_->SetViewportSize(size);
194 } 206 }
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 400
389 UserActivityMonitor* activity_monitor = 401 UserActivityMonitor* activity_monitor =
390 window_server_->GetUserActivityMonitorForUser( 402 window_server_->GetUserActivityMonitorForUser(
391 window_server_->user_id_tracker()->active_id()); 403 window_server_->user_id_tracker()->active_id());
392 activity_monitor->OnUserActivity(); 404 activity_monitor->OnUserActivity();
393 return EventDispatchDetails(); 405 return EventDispatchDetails();
394 } 406 }
395 407
396 } // namespace ws 408 } // namespace ws
397 } // namespace ui 409 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/display.h ('k') | services/ui/ws/display_binding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698