| Index: ash/common/keyboard/keyboard_ui.cc
|
| diff --git a/ash/common/keyboard/keyboard_ui.cc b/ash/common/keyboard/keyboard_ui.cc
|
| index c9d2fe9c8c167b3a0ad9bdf11bec13bcedd0dc94..993b83eba18454a632397909f365e5fd76c52ee4 100644
|
| --- a/ash/common/keyboard/keyboard_ui.cc
|
| +++ b/ash/common/keyboard/keyboard_ui.cc
|
| @@ -17,7 +17,7 @@ namespace ash {
|
|
|
| class KeyboardUIImpl : public KeyboardUI, public AccessibilityObserver {
|
| public:
|
| - KeyboardUIImpl() {
|
| + KeyboardUIImpl() : enabled_(false) {
|
| WmShell::Get()->system_tray_notifier()->AddAccessibilityObserver(this);
|
| }
|
|
|
| @@ -41,11 +41,18 @@ class KeyboardUIImpl : public KeyboardUI, public AccessibilityObserver {
|
| // AccessibilityObserver:
|
| void OnAccessibilityModeChanged(
|
| AccessibilityNotificationVisibility notify) override {
|
| + bool enabled = IsEnabled();
|
| + if (enabled_ == enabled)
|
| + return;
|
| +
|
| + enabled_ = enabled;
|
| FOR_EACH_OBSERVER(KeyboardUIObserver, *observers(),
|
| - OnKeyboardEnabledStateChanged(IsEnabled()));
|
| + OnKeyboardEnabledStateChanged(enabled));
|
| }
|
|
|
| private:
|
| + bool enabled_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(KeyboardUIImpl);
|
| };
|
|
|
|
|