Chromium Code Reviews| 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..5eee37851da27d2d0c09c2847cf2256f5368af96 |
| --- /dev/null |
| +++ b/ash/mus/accessibility_delegate_mus.cc |
| @@ -0,0 +1,32 @@ |
| +// 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 shell { |
| +class Connector; |
|
msw
2016/07/15 15:33:14
nit: remove
James Cook
2016/07/15 17:03:06
Done.
|
| +} |
| + |
| +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 |