Index: ash/virtual_keyboard_controller.h |
diff --git a/ash/virtual_keyboard_controller.h b/ash/virtual_keyboard_controller.h |
index ebbc0fde1858a41f2e32c56d971f967ee831eed1..01a08c6029411c0ea21d6175b138ae7f4c773cff 100644 |
--- a/ash/virtual_keyboard_controller.h |
+++ b/ash/virtual_keyboard_controller.h |
@@ -7,11 +7,14 @@ |
#include "ash/ash_export.h" |
#include "ash/shell_observer.h" |
+#include "ui/events/input_device_event_observer.h" |
namespace ash { |
-// This class observes enter/leaving maximized mode for virtual keyboard. |
-class ASH_EXPORT VirtualKeyboardController : public ShellObserver { |
+// This class observes input device changes for the virtual keyboard. |
+class ASH_EXPORT VirtualKeyboardController |
+ : public ShellObserver, |
+ public ui::InputDeviceEventObserver { |
public: |
VirtualKeyboardController(); |
virtual ~VirtualKeyboardController(); |
@@ -20,7 +23,26 @@ class ASH_EXPORT VirtualKeyboardController : public ShellObserver { |
virtual void OnMaximizeModeStarted() override; |
virtual void OnMaximizeModeEnded() override; |
+ // ui::InputDeviceObserver: |
+ // TODO(rsadam@): Remove when autovirtual keyboard flag is on by default. |
+ virtual void OnTouchscreenDeviceConfigurationChanged() override; |
+ virtual void OnKeyboardDeviceConfigurationChanged() override; |
+ |
private: |
+ // Determines the active input devices. |
flackr
2014/10/27 19:05:02
nit: Descriptive comments (http://google-styleguid
rsadam
2014/10/27 19:51:42
Done.
|
+ virtual void UpdateDevices(); |
flackr
2014/10/27 19:05:01
No virtual on any of these unless they are going t
rsadam
2014/10/27 19:51:42
Done.
|
+ // Updates the keyboard state. |
+ virtual void UpdateKeyboardEnabled(); |
+ // Creates/Destroys the virtual keyboard as necessary. |
flackr
2014/10/27 19:05:01
Creates the virtual keyboard if |enabled|, destroy
rsadam
2014/10/27 19:51:42
Done.
|
+ virtual void SetKeyboardEnabled(bool enabled); |
+ |
+ // True if there exists an external keyboard enabled. |
flackr
2014/10/27 19:05:02
grammar? True if an external keyboard is connected
rsadam
2014/10/27 19:51:42
Done.
|
+ bool has_external_keyboard_; |
+ // True if there exists an internal keyboard enabled. |
+ bool has_internal_keyboard_; |
+ // True if there exists a touchscreen device enabled. |
+ bool has_touchscreen_; |
+ |
DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardController); |
}; |