| OLD | NEW |
| 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/common/keyboard/keyboard_ui.h" | 5 #include "ash/common/keyboard/keyboard_ui.h" |
| 6 | 6 |
| 7 #include "ash/common/accessibility_delegate.h" | 7 #include "ash/common/accessibility_delegate.h" |
| 8 #include "ash/common/keyboard/keyboard_ui_observer.h" | 8 #include "ash/common/keyboard/keyboard_ui_observer.h" |
| 9 #include "ash/common/system/accessibility_observer.h" | 9 #include "ash/common/system/accessibility_observer.h" |
| 10 #include "ash/common/system/tray/system_tray_notifier.h" | 10 #include "ash/common/system/tray/system_tray_notifier.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 ~KeyboardUIImpl() override { | 24 ~KeyboardUIImpl() override { |
| 25 if (WmShell::HasInstance() && WmShell::Get()->system_tray_notifier()) | 25 if (WmShell::HasInstance() && WmShell::Get()->system_tray_notifier()) |
| 26 WmShell::Get()->system_tray_notifier()->RemoveAccessibilityObserver(this); | 26 WmShell::Get()->system_tray_notifier()->RemoveAccessibilityObserver(this); |
| 27 } | 27 } |
| 28 | 28 |
| 29 // KeyboardUI: | 29 // KeyboardUI: |
| 30 void Show() override { | 30 void Show() override { |
| 31 keyboard::KeyboardController::GetInstance()->ShowKeyboard(true); | 31 keyboard::KeyboardController::GetInstance()->ShowKeyboard(true); |
| 32 } | 32 } |
| 33 void ShowInDisplay(int64_t display_id) override { |
| 34 keyboard::KeyboardController::GetInstance()->ShowKeyboardInDisplay( |
| 35 display_id); |
| 36 } |
| 33 void Hide() override { | 37 void Hide() override { |
| 34 // Do nothing as this is called from ash::Shell, which also calls through | 38 // Do nothing as this is called from ash::Shell, which also calls through |
| 35 // to the appropriate keyboard functions. | 39 // to the appropriate keyboard functions. |
| 36 } | 40 } |
| 37 bool IsEnabled() override { | 41 bool IsEnabled() override { |
| 38 return WmShell::Get()->accessibility_delegate()->IsVirtualKeyboardEnabled(); | 42 return WmShell::Get()->accessibility_delegate()->IsVirtualKeyboardEnabled(); |
| 39 } | 43 } |
| 40 | 44 |
| 41 // AccessibilityObserver: | 45 // AccessibilityObserver: |
| 42 void OnAccessibilityModeChanged( | 46 void OnAccessibilityModeChanged( |
| (...skipping 24 matching lines...) Expand all Loading... |
| 67 observers_.AddObserver(observer); | 71 observers_.AddObserver(observer); |
| 68 } | 72 } |
| 69 | 73 |
| 70 void KeyboardUI::RemoveObserver(KeyboardUIObserver* observer) { | 74 void KeyboardUI::RemoveObserver(KeyboardUIObserver* observer) { |
| 71 observers_.RemoveObserver(observer); | 75 observers_.RemoveObserver(observer); |
| 72 } | 76 } |
| 73 | 77 |
| 74 KeyboardUI::KeyboardUI() {} | 78 KeyboardUI::KeyboardUI() {} |
| 75 | 79 |
| 76 } // namespace ash | 80 } // namespace ash |
| OLD | NEW |