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

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

Issue 2127383003: mus: Introduce high-contrast mode in mus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/window_server.h" 5 #include "services/ui/ws/window_server.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 275
276 ServerWindow* WindowServer::GetFocusedWindow() { 276 ServerWindow* WindowServer::GetFocusedWindow() {
277 for (Display* display : display_manager_->displays()) { 277 for (Display* display : display_manager_->displays()) {
278 ServerWindow* focused_window = display->GetFocusedWindow(); 278 ServerWindow* focused_window = display->GetFocusedWindow();
279 if (focused_window) 279 if (focused_window)
280 return focused_window; 280 return focused_window;
281 } 281 }
282 return nullptr; 282 return nullptr;
283 } 283 }
284 284
285 void WindowServer::SetHighContrastMode(bool enabled) {
286 if (is_in_high_contrast_mode_ == enabled)
287 return;
288 is_in_high_contrast_mode_ = enabled;
289 for (Display* display : display_manager_->displays()) {
290 display->SchedulePaint(display->root_window(),
291 gfx::Rect(display->root_window()->bounds().size()));
292 }
293 }
294
285 uint32_t WindowServer::GenerateWindowManagerChangeId( 295 uint32_t WindowServer::GenerateWindowManagerChangeId(
286 WindowTree* source, 296 WindowTree* source,
287 uint32_t client_change_id) { 297 uint32_t client_change_id) {
288 const uint32_t wm_change_id = next_wm_change_id_++; 298 const uint32_t wm_change_id = next_wm_change_id_++;
289 in_flight_wm_change_map_[wm_change_id] = {source->id(), client_change_id}; 299 in_flight_wm_change_map_[wm_change_id] = {source->id(), client_change_id};
290 return wm_change_id; 300 return wm_change_id;
291 } 301 }
292 302
293 void WindowServer::WindowManagerChangeCompleted( 303 void WindowServer::WindowManagerChangeCompleted(
294 uint32_t window_manager_change_id, 304 uint32_t window_manager_change_id,
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 void WindowServer::OnUserIdAdded(const UserId& id) { 751 void WindowServer::OnUserIdAdded(const UserId& id) {
742 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); 752 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr);
743 } 753 }
744 754
745 void WindowServer::OnUserIdRemoved(const UserId& id) { 755 void WindowServer::OnUserIdRemoved(const UserId& id) {
746 activity_monitor_map_.erase(id); 756 activity_monitor_map_.erase(id);
747 } 757 }
748 758
749 } // namespace ws 759 } // namespace ws
750 } // namespace ui 760 } // namespace ui
OLDNEW
« services/ui/ws/accessibility_manager.cc ('K') | « services/ui/ws/window_server.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698