OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SYSTEM_IME_TRAY_IME_H_ | 5 #ifndef ASH_SYSTEM_IME_TRAY_IME_CHROMEOS_H_ |
6 #define ASH_SYSTEM_IME_TRAY_IME_H_ | 6 #define ASH_SYSTEM_IME_TRAY_IME_CHROMEOS_H_ |
7 | 7 |
8 #include "ash/system/chromeos/virtual_keyboard/virtual_keyboard_observer.h" | |
8 #include "ash/system/ime/ime_observer.h" | 9 #include "ash/system/ime/ime_observer.h" |
9 #include "ash/system/tray/system_tray_item.h" | 10 #include "ash/system/tray/system_tray_item.h" |
11 #include "ash/system/tray_accessibility.h" | |
10 | 12 |
11 namespace views { | 13 namespace views { |
12 class Label; | 14 class Label; |
13 } | 15 } |
14 | 16 |
15 namespace ash { | 17 namespace ash { |
16 struct IMEInfo; | 18 struct IMEInfo; |
17 | 19 |
18 namespace tray { | 20 namespace tray { |
19 class IMEDefaultView; | 21 class IMEDefaultView; |
20 class IMEDetailedView; | 22 class IMEDetailedView; |
21 class IMENotificationView; | 23 class IMENotificationView; |
22 } | 24 } |
23 | 25 |
24 class TrayItemView; | 26 class TrayItemView; |
25 | 27 |
26 class TrayIME : public SystemTrayItem, | 28 class TrayIME : public SystemTrayItem, |
27 public IMEObserver { | 29 public IMEObserver, |
30 public AccessibilityObserver, | |
31 public VirtualKeyboardObserver { | |
28 public: | 32 public: |
29 explicit TrayIME(SystemTray* system_tray); | 33 explicit TrayIME(SystemTray* system_tray); |
30 ~TrayIME() override; | 34 ~TrayIME() override; |
31 | 35 |
36 // Overridden from VirtualKeyboardObserver. | |
37 void OnKeyboardSuppressionChanged(bool suppressed) override; | |
38 | |
39 // Overridden from AccessibilityObserver: | |
40 void OnAccessibilityModeChanged( | |
41 ui::AccessibilityNotificationVisibility notify) override; | |
42 | |
32 private: | 43 private: |
44 void Update(); | |
Mr4D (OOO till 08-26)
2015/01/09 22:50:38
You might want to add some better comments here to
rsadam
2015/01/09 23:45:07
Done.
| |
33 void UpdateTrayLabel(const IMEInfo& info, size_t count); | 45 void UpdateTrayLabel(const IMEInfo& info, size_t count); |
46 bool ShouldShowKeyboardToggle(); | |
47 base::string16 GetDefaultViewLabel(bool show_ime_label); | |
34 | 48 |
35 // Overridden from SystemTrayItem. | 49 // Overridden from SystemTrayItem. |
36 views::View* CreateTrayView(user::LoginStatus status) override; | 50 views::View* CreateTrayView(user::LoginStatus status) override; |
37 views::View* CreateDefaultView(user::LoginStatus status) override; | 51 views::View* CreateDefaultView(user::LoginStatus status) override; |
38 views::View* CreateDetailedView(user::LoginStatus status) override; | 52 views::View* CreateDetailedView(user::LoginStatus status) override; |
39 void DestroyTrayView() override; | 53 void DestroyTrayView() override; |
40 void DestroyDefaultView() override; | 54 void DestroyDefaultView() override; |
41 void DestroyDetailedView() override; | 55 void DestroyDetailedView() override; |
42 void UpdateAfterLoginStatusChange(user::LoginStatus status) override; | 56 void UpdateAfterLoginStatusChange(user::LoginStatus status) override; |
43 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override; | 57 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override; |
44 | 58 |
45 // Overridden from IMEObserver. | 59 // Overridden from IMEObserver. |
46 void OnIMERefresh() override; | 60 void OnIMERefresh() override; |
47 | 61 |
48 TrayItemView* tray_label_; | 62 TrayItemView* tray_label_; |
49 tray::IMEDefaultView* default_; | 63 tray::IMEDefaultView* default_; |
50 tray::IMEDetailedView* detailed_; | 64 tray::IMEDetailedView* detailed_; |
65 // Whether the virtual keyboard is suppressed. | |
66 bool keyboard_suppressed_; | |
51 | 67 |
52 DISALLOW_COPY_AND_ASSIGN(TrayIME); | 68 DISALLOW_COPY_AND_ASSIGN(TrayIME); |
53 }; | 69 }; |
54 | 70 |
55 } // namespace ash | 71 } // namespace ash |
56 | 72 |
57 #endif // ASH_SYSTEM_IME_TRAY_IME_H_ | 73 #endif // ASH_SYSTEM_IME_TRAY_IME_CHROMEOS_H_ |
OLD | NEW |