Stop running PPAPITest and PPAPINaClGLibcTest Pepper tests.
[chromium-blink-merge.git] / ash / virtual_keyboard_controller.h
blob301eb0b24201d25cb4929d20fb7fe3d34cdfb666
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 "ash/system/tray/system_tray_notifier.h"
11 #include "ui/events/devices/input_device_event_observer.h"
13 namespace ash {
15 // This class observes input device changes for the virtual keyboard.
16 class ASH_EXPORT VirtualKeyboardController
17 : public ShellObserver,
18 public ui::InputDeviceEventObserver {
19 public:
20 VirtualKeyboardController();
21 ~VirtualKeyboardController() override;
23 // ShellObserver:
24 // TODO(rsadam@): Remove when autovirtual keyboard flag is on by default.
25 void OnMaximizeModeStarted() override;
26 void OnMaximizeModeEnded() override;
28 // ui::InputDeviceObserver:
29 void OnTouchscreenDeviceConfigurationChanged() override;
30 void OnKeyboardDeviceConfigurationChanged() override;
31 void OnMouseDeviceConfigurationChanged() override;
32 void OnTouchpadDeviceConfigurationChanged() override;
34 // Toggles whether the presense of an external keyboard should be ignored
35 // when determining whether or not to show the on-screen keyboard.
36 void ToggleIgnoreExternalKeyboard();
38 private:
39 // Updates the list of active input devices.
40 void UpdateDevices();
42 // Updates the keyboard state.
43 void UpdateKeyboardEnabled();
45 // Creates the keyboard if |enabled|, else destroys it.
46 void SetKeyboardEnabled(bool enabled);
48 // True if an external keyboard is connected.
49 bool has_external_keyboard_;
50 // True if an internal keyboard is connected.
51 bool has_internal_keyboard_;
52 // True if a touchscreen is connected.
53 bool has_touchscreen_;
54 // True if the presense of an external keyboard should be ignored.
55 bool ignore_external_keyboard_;
57 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardController);
60 } // namespace ash
62 #endif // ASH_VIRTUAL_KEYBOARD_CONTROLLER_H_