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

Side by Side Diff: ash/keyboard/keyboard_ui.cc

Issue 2078393005: mash: Move accessibility_types.h from ui namespace to ash namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a11y
Patch Set: fix chromevox code generated from js Created 4 years, 6 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ash/keyboard/keyboard_ui.h" 5 #include "ash/keyboard/keyboard_ui.h"
6 6
7 #include "ash/common/accessibility_delegate.h" 7 #include "ash/common/accessibility_delegate.h"
8 #include "ash/common/system/accessibility_observer.h" 8 #include "ash/common/system/accessibility_observer.h"
9 #include "ash/common/system/tray/wm_system_tray_notifier.h" 9 #include "ash/common/system/tray/wm_system_tray_notifier.h"
10 #include "ash/common/wm_shell.h" 10 #include "ash/common/wm_shell.h"
(...skipping 24 matching lines...) Expand all
35 // to the appropriate keyboard functions. 35 // to the appropriate keyboard functions.
36 } 36 }
37 bool IsEnabled() override { 37 bool IsEnabled() override {
38 return WmShell::Get() 38 return WmShell::Get()
39 ->GetAccessibilityDelegate() 39 ->GetAccessibilityDelegate()
40 ->IsVirtualKeyboardEnabled(); 40 ->IsVirtualKeyboardEnabled();
41 } 41 }
42 42
43 // AccessibilityObserver: 43 // AccessibilityObserver:
44 void OnAccessibilityModeChanged( 44 void OnAccessibilityModeChanged(
45 ui::AccessibilityNotificationVisibility notify) override { 45 AccessibilityNotificationVisibility notify) override {
46 FOR_EACH_OBSERVER(KeyboardUIObserver, *observers(), 46 FOR_EACH_OBSERVER(KeyboardUIObserver, *observers(),
47 OnKeyboardEnabledStateChanged(IsEnabled())); 47 OnKeyboardEnabledStateChanged(IsEnabled()));
48 } 48 }
49 49
50 private: 50 private:
51 DISALLOW_COPY_AND_ASSIGN(KeyboardUIImpl); 51 DISALLOW_COPY_AND_ASSIGN(KeyboardUIImpl);
52 }; 52 };
53 53
54 KeyboardUI::~KeyboardUI() {} 54 KeyboardUI::~KeyboardUI() {}
55 55
56 // static 56 // static
57 std::unique_ptr<KeyboardUI> KeyboardUI::Create() { 57 std::unique_ptr<KeyboardUI> KeyboardUI::Create() {
58 return base::WrapUnique(new KeyboardUIImpl); 58 return base::WrapUnique(new KeyboardUIImpl);
59 } 59 }
60 60
61 void KeyboardUI::AddObserver(KeyboardUIObserver* observer) { 61 void KeyboardUI::AddObserver(KeyboardUIObserver* observer) {
62 observers_.AddObserver(observer); 62 observers_.AddObserver(observer);
63 } 63 }
64 64
65 void KeyboardUI::RemoveObserver(KeyboardUIObserver* observer) { 65 void KeyboardUI::RemoveObserver(KeyboardUIObserver* observer) {
66 observers_.RemoveObserver(observer); 66 observers_.RemoveObserver(observer);
67 } 67 }
68 68
69 KeyboardUI::KeyboardUI() {} 69 KeyboardUI::KeyboardUI() {}
70 70
71 } // namespace ash 71 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/wm_system_tray_notifier.cc ('k') | ash/magnifier/magnification_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698