Index: services/ui/ws/accessibility_manager.cc |
diff --git a/services/ui/ws/accessibility_manager.cc b/services/ui/ws/accessibility_manager.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ce6b656318b2410b876fb4fa80f6a2424614f70e |
--- /dev/null |
+++ b/services/ui/ws/accessibility_manager.cc |
@@ -0,0 +1,33 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "services/ui/ws/accessibility_manager.h" |
+ |
+#include "services/ui/ws/window_server.h" |
+ |
+namespace ui { |
+namespace ws { |
+ |
+AccessibilityManager::AccessibilityManager(WindowServer* window_server) |
+ : window_server_(window_server), binding_(this) { |
+ DCHECK(window_server_); |
+} |
+ |
+AccessibilityManager::~AccessibilityManager() {} |
+ |
+void AccessibilityManager::Bind(mojom::AccessibilityManagerRequest request) { |
+ if (binding_.is_bound()) |
sky
2016/07/08 16:45:00
nit: I'm pretty sure you can always call binding_.
sadrul
2016/07/08 17:33:25
Done.
|
+ binding_.Close(); |
+ binding_.Bind(std::move(request)); |
+ binding_.set_connection_error_handler( |
+ base::Bind(&mojo::Binding<mojom::AccessibilityManager>::Close, |
sky
2016/07/08 16:45:00
Do you really need this? Seems like it doesn't mat
sadrul
2016/07/08 17:33:25
Cool. Removed.
|
+ base::Unretained(&binding_))); |
+} |
+ |
+void AccessibilityManager::SetHighContrastMode(bool enabled) { |
+ window_server_->SetHighContrastMode(enabled); |
sky
2016/07/08 16:45:00
Isn't high contrast mode specific to a user and no
sadrul
2016/07/08 17:33:25
Oh yeah, good point. Fixed.
|
+} |
+ |
+} // namespace ws |
+} // namespace ui |