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

Unified Diff: ash/mus/accessibility_delegate_mus.cc

Issue 2154523002: Move AccessibilityDelegate ownership to ash::WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@setmediadelegate
Patch Set: fix mash_unittests 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/mus/accessibility_delegate_mus.h ('k') | ash/mus/bridge/wm_shell_mus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/accessibility_delegate_mus.cc
diff --git a/ash/mus/accessibility_delegate_mus.cc b/ash/mus/accessibility_delegate_mus.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a3e66dc8b5625ab6c656d787a55c7062e46e327d
--- /dev/null
+++ b/ash/mus/accessibility_delegate_mus.cc
@@ -0,0 +1,28 @@
+// 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 "ash/mus/accessibility_delegate_mus.h"
+
+#include "services/shell/public/cpp/connector.h"
+
+namespace ash {
+
+AccessibilityDelegateMus::AccessibilityDelegateMus(shell::Connector* connector)
+ : connector_(connector) {}
+
+AccessibilityDelegateMus::~AccessibilityDelegateMus() {}
+
+ui::mojom::AccessibilityManager*
+AccessibilityDelegateMus::GetAccessibilityManager() {
+ if (!accessibility_manager_ptr_.is_bound())
+ connector_->ConnectToInterface("mojo:ui", &accessibility_manager_ptr_);
+ return accessibility_manager_ptr_.get();
+}
+
+void AccessibilityDelegateMus::ToggleHighContrast() {
+ DefaultAccessibilityDelegate::ToggleHighContrast();
+ GetAccessibilityManager()->SetHighContrastMode(IsHighContrastEnabled());
+}
+
+} // namespace ash
« no previous file with comments | « ash/mus/accessibility_delegate_mus.h ('k') | ash/mus/bridge/wm_shell_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698