| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef ASH_VIRTUAL_KEYBOARD_CONTROLLER_H_ | 5 #ifndef ASH_VIRTUAL_KEYBOARD_CONTROLLER_H_ |
| 6 #define ASH_VIRTUAL_KEYBOARD_CONTROLLER_H_ | 6 #define ASH_VIRTUAL_KEYBOARD_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/shell_observer.h" | 9 #include "ash/shell_observer.h" |
| 10 #include "ash/system/tray/system_tray_notifier.h" | 10 #include "ash/system/tray/system_tray_notifier.h" |
| 11 #include "ui/events/devices/input_device_event_observer.h" | 11 #include "ui/events/devices/input_device_event_observer.h" |
| 12 | 12 |
| 13 namespace ash { | 13 namespace ash { |
| 14 | 14 |
| 15 // This class observes input device changes for the virtual keyboard. | 15 // This class observes input device changes for the virtual keyboard. |
| 16 class ASH_EXPORT VirtualKeyboardController | 16 class ASH_EXPORT VirtualKeyboardController |
| 17 : public ShellObserver, | 17 : public ShellObserver, |
| 18 public ui::InputDeviceEventObserver { | 18 public ui::InputDeviceEventObserver { |
| 19 public: | 19 public: |
| 20 VirtualKeyboardController(); | 20 VirtualKeyboardController(); |
| 21 ~VirtualKeyboardController() override; | 21 ~VirtualKeyboardController() override; |
| 22 | 22 |
| 23 // ShellObserver: | 23 // ShellObserver: |
| 24 // TODO(rsadam@): Remove when autovirtual keyboard flag is on by default. | 24 // TODO(rsadam@): Remove when autovirtual keyboard flag is on by default. |
| 25 virtual void OnMaximizeModeStarted() override; | 25 void OnMaximizeModeStarted() override; |
| 26 virtual void OnMaximizeModeEnded() override; | 26 void OnMaximizeModeEnded() override; |
| 27 | 27 |
| 28 // ui::InputDeviceObserver: | 28 // ui::InputDeviceObserver: |
| 29 virtual void OnTouchscreenDeviceConfigurationChanged() override; | 29 void OnTouchscreenDeviceConfigurationChanged() override; |
| 30 virtual void OnKeyboardDeviceConfigurationChanged() override; | 30 void OnKeyboardDeviceConfigurationChanged() override; |
| 31 | 31 |
| 32 // Toggles whether the presense of an external keyboard should be ignored | 32 // Toggles whether the presense of an external keyboard should be ignored |
| 33 // when determining whether or not to show the on-screen keyboard. | 33 // when determining whether or not to show the on-screen keyboard. |
| 34 void ToggleIgnoreExternalKeyboard(); | 34 void ToggleIgnoreExternalKeyboard(); |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 // Updates the list of active input devices. | 37 // Updates the list of active input devices. |
| 38 void UpdateDevices(); | 38 void UpdateDevices(); |
| 39 | 39 |
| 40 // Updates the keyboard state. | 40 // Updates the keyboard state. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 51 bool has_touchscreen_; | 51 bool has_touchscreen_; |
| 52 // True if the presense of an external keyboard should be ignored. | 52 // True if the presense of an external keyboard should be ignored. |
| 53 bool ignore_external_keyboard_; | 53 bool ignore_external_keyboard_; |
| 54 | 54 |
| 55 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardController); | 55 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardController); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace ash | 58 } // namespace ash |
| 59 | 59 |
| 60 #endif // ASH_VIRTUAL_KEYBOARD_CONTROLLER_H_ | 60 #endif // ASH_VIRTUAL_KEYBOARD_CONTROLLER_H_ |
| OLD | NEW |