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

Unified Diff: services/ui/ws/window_server.cc

Issue 2759933007: [mus]Add FrameGenerator::SetHighContrastMode(bool) (Closed)
Patch Set: Addressed nits Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/ws/window_server.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_server.cc
diff --git a/services/ui/ws/window_server.cc b/services/ui/ws/window_server.cc
index a1a67187ffb9ada208d3a6b522edd8f6c0aed92e..c893898437022868b74c20521f7dbce6ddb9775f 100644
--- a/services/ui/ws/window_server.cc
+++ b/services/ui/ws/window_server.cc
@@ -276,15 +276,17 @@ ServerWindow* WindowServer::GetFocusedWindow() {
return nullptr;
}
-bool WindowServer::IsActiveUserInHighContrastMode() const {
- return IsUserInHighContrastMode(user_id_tracker_.active_id());
-}
-
void WindowServer::SetHighContrastMode(const UserId& user, bool enabled) {
// TODO(fsamuel): This doesn't really seem like it's a window server concept?
if (IsUserInHighContrastMode(user) == enabled)
return;
high_contrast_mode_[user] = enabled;
+
+ if (user == user_id_tracker_.active_id()) {
+ // Propagate the change to all Displays so that FrameGenerators start
+ // requesting BeginFrames.
+ display_manager_->SetHighContrastMode(enabled);
+ }
}
uint32_t WindowServer::GenerateWindowManagerChangeId(
« no previous file with comments | « services/ui/ws/window_server.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698