Chromium Code Reviews| 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 "ui/events/input_device_event_observer.h" | |
| 10 | 11 |
| 11 namespace ash { | 12 namespace ash { |
| 12 | 13 |
| 13 // This class observes enter/leaving maximized mode for virtual keyboard. | 14 // This class observes enter/leaving maximized mode for virtual keyboard. |
| 14 class ASH_EXPORT VirtualKeyboardController : public ShellObserver { | 15 class ASH_EXPORT VirtualKeyboardController |
| 16 : public ShellObserver, | |
| 17 public ui::InputDeviceEventObserver { | |
| 15 public: | 18 public: |
| 16 VirtualKeyboardController(); | 19 VirtualKeyboardController(); |
| 17 virtual ~VirtualKeyboardController(); | 20 virtual ~VirtualKeyboardController(); |
| 18 | 21 |
| 19 // ShellObserver: | 22 // ShellObserver: |
| 20 virtual void OnMaximizeModeStarted() OVERRIDE; | 23 virtual void OnMaximizeModeStarted() OVERRIDE; |
| 21 virtual void OnMaximizeModeEnded() OVERRIDE; | 24 virtual void OnMaximizeModeEnded() OVERRIDE; |
| 22 | 25 |
| 26 // InputDeviceObserver: | |
| 27 virtual void OnTouchscreenDeviceConfigurationChanged() OVERRIDE; | |
| 28 virtual void OnKeyboardDeviceConfigurationChanged() OVERRIDE; | |
|
flackr
2014/10/04 01:02:54
nit: empty line before private:
rsadam
2014/10/23 20:10:52
Done.
| |
| 23 private: | 29 private: |
| 30 virtual void Update(); | |
| 31 virtual void UpdateDevices(); | |
| 32 | |
| 33 bool has_external_keyboard_; | |
| 34 bool has_internal_keyboard_; | |
| 35 bool has_touchscreen_; | |
| 36 bool maximized_; | |
| 37 | |
| 24 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardController); | 38 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardController); |
| 25 }; | 39 }; |
| 26 | 40 |
| 27 } // namespace ash | 41 } // namespace ash |
| 28 | 42 |
| 29 #endif // ASH_VIRTUAL_KEYBOARD_CONTROLLER_H_ | 43 #endif // ASH_VIRTUAL_KEYBOARD_CONTROLLER_H_ |
| OLD | NEW |