OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #ifndef ASH_SYSTEM_CHROMEOS_VIRTUAL_KEYBOARD_TRAY_KEYBOARD_LOCK_H | |
6 #define ASH_SYSTEM_CHROMEOS_VIRTUAL_KEYBOARD_TRAY_KEYBOARD_LOCK_H | |
7 | |
8 #include "ash/shell_observer.h" | |
9 #include "ash/system/chromeos/virtual_keyboard/virtual_keyboard_observer.h" | |
10 #include "ash/system/tray/system_tray_notifier.h" | |
11 #include "ash/system/tray/tray_image_item.h" | |
12 #include "ash/system/tray_accessibility.h" | |
13 #include "ash/wm/maximize_mode/maximize_mode_controller.h" | |
14 | |
15 namespace ash { | |
16 | |
17 // TrayKeyboardLock is a provider of the default view for the SystemTray. This | |
18 // view indicates the current state of the virtual keyboard when an external | |
19 // keyboard is plugged in. The default view can be interacted with, it toggles | |
20 // the state of the keyboard lock. | |
21 class ASH_EXPORT TrayKeyboardLock : public SystemTrayItem, | |
22 public VirtualKeyboardObserver { | |
23 public: | |
24 explicit TrayKeyboardLock(SystemTray* system_tray); | |
25 virtual ~TrayKeyboardLock(); | |
26 | |
27 // VirtualKeyboardObserver | |
28 virtual void OnKeyboardSuppressionChanged(bool suppressed) override; | |
29 | |
30 // SystemTrayItem: | |
31 virtual views::View* CreateDefaultView(user::LoginStatus status) override; | |
32 | |
33 private: | |
34 friend class TrayKeyboardLockTest; | |
35 | |
36 // True if the on-screen keyboard is suppressed. | |
37 bool virtual_keyboard_suppressed_; | |
38 | |
39 DISALLOW_COPY_AND_ASSIGN(TrayKeyboardLock); | |
40 }; | |
41 | |
42 } // namespace ash | |
43 | |
44 #endif // ASH_SYSTEM_CHROMEOS_VIRTUAL_KEYBOARD_TRAY_KEYBOARD_LOCK_H | |
OLD | NEW |