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

Side by Side Diff: services/ui/ws/display.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 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 <vector> 8 #include <vector>
9 9
10 #include "base/debug/debugger.h" 10 #include "base/debug/debugger.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 factory->user_id() == window_server_->user_id_tracker()->active_id(); 268 factory->user_id() == window_server_->user_id_tracker()->active_id();
269 display_root->root()->SetVisible(is_active); 269 display_root->root()->SetVisible(is_active);
270 display_root->window_manager_state()->window_tree()->AddRootForWindowManager( 270 display_root->window_manager_state()->window_tree()->AddRootForWindowManager(
271 display_root->root()); 271 display_root->root());
272 } 272 }
273 273
274 ServerWindow* Display::GetRootWindow() { 274 ServerWindow* Display::GetRootWindow() {
275 return root_.get(); 275 return root_.get();
276 } 276 }
277 277
278 bool Display::IsInHighContrastMode() {
279 return window_server_->IsActiveUserInHighContrastMode();
280 }
281
278 void Display::OnEvent(const ui::Event& event) { 282 void Display::OnEvent(const ui::Event& event) {
279 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot(); 283 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot();
280 if (display_root) 284 if (display_root)
281 display_root->window_manager_state()->ProcessEvent(event); 285 display_root->window_manager_state()->ProcessEvent(event);
282 window_server_ 286 window_server_
283 ->GetUserActivityMonitorForUser( 287 ->GetUserActivityMonitorForUser(
284 window_server_->user_id_tracker()->active_id()) 288 window_server_->user_id_tracker()->active_id())
285 ->OnUserActivity(); 289 ->OnUserActivity();
286 } 290 }
287 291
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 } 414 }
411 415
412 void Display::OnWindowManagerWindowTreeFactoryReady( 416 void Display::OnWindowManagerWindowTreeFactoryReady(
413 WindowManagerWindowTreeFactory* factory) { 417 WindowManagerWindowTreeFactory* factory) {
414 if (!binding_) 418 if (!binding_)
415 CreateWindowManagerDisplayRootFromFactory(factory); 419 CreateWindowManagerDisplayRootFromFactory(factory);
416 } 420 }
417 421
418 } // namespace ws 422 } // namespace ws
419 } // namespace ui 423 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698