Add Search Service in Enhanced Bookmark Bridge
[chromium-blink-merge.git] / ash / virtual_keyboard_controller.h
blobc32bdb0cc65237fc0f95fb0d5441c767da0e3c35
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
3 // found in the LICENSE file.
5 #ifndef ASH_VIRTUAL_KEYBOARD_CONTROLLER_H_
6 #define ASH_VIRTUAL_KEYBOARD_CONTROLLER_H_
8 #include "ash/ash_export.h"
9 #include "ash/shell_observer.h"
10 #include "ui/events/input_device_event_observer.h"
12 namespace ash {
14 // This class observes input device changes for the virtual keyboard.
15 class ASH_EXPORT VirtualKeyboardController
16 : public ShellObserver,
17 public ui::InputDeviceEventObserver {
18 public:
19 VirtualKeyboardController();
20 ~VirtualKeyboardController() override;
22 // ShellObserver:
23 virtual void OnMaximizeModeStarted() override;
24 virtual void OnMaximizeModeEnded() override;
26 // ui::InputDeviceObserver:
27 // TODO(rsadam@): Remove when autovirtual keyboard flag is on by default.
28 virtual void OnTouchscreenDeviceConfigurationChanged() override;
29 virtual void OnKeyboardDeviceConfigurationChanged() override;
31 private:
32 // Updates the list of active input devices.
33 void UpdateDevices();
35 // Updates the keyboard state.
36 void UpdateKeyboardEnabled();
38 // Creates the keyboard if |enabled|, else destroys it.
39 void SetKeyboardEnabled(bool enabled);
41 // True if an external keyboard is connected.
42 bool has_external_keyboard_;
43 // True if an internal keyboard is connected.
44 bool has_internal_keyboard_;
45 // True if a touchscreen is connected.
46 bool has_touchscreen_;
48 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardController);
51 } // namespace ash
53 #endif // ASH_VIRTUAL_KEYBOARD_CONTROLLER_H_