OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
Mr4D (OOO till 08-26)
2015/01/12 22:35:37
Can you remove the "(c) " ? (we apparently do not
| |
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_IME_TRAY_IME_CHROMEOS_H_ | |
6 #define ASH_SYSTEM_IME_TRAY_IME_CHROMEOS_H_ | |
7 | |
8 #include "ash/system/chromeos/virtual_keyboard/virtual_keyboard_observer.h" | |
9 #include "ash/system/ime/ime_observer.h" | |
10 #include "ash/system/tray/system_tray_delegate.h" | |
Mr4D (OOO till 08-26)
2015/01/12 22:35:37
Just checking - Why do we need this header include
rsadam
2015/01/13 00:05:34
For definitions of IMEPropertyInfoList and IMEInfo
Mr4D (OOO till 08-26)
2015/01/13 15:04:05
Acknowledged.
| |
11 #include "ash/system/tray/system_tray_item.h" | |
12 #include "ash/system/tray_accessibility.h" | |
13 | |
14 namespace views { | |
15 class Label; | |
16 } | |
17 | |
18 namespace ash { | |
19 struct IMEInfo; | |
20 | |
21 namespace tray { | |
22 class IMEDefaultView; | |
23 class IMEDetailedView; | |
24 class IMENotificationView; | |
25 } | |
26 | |
27 class TrayItemView; | |
28 | |
29 class ASH_EXPORT TrayIME : public SystemTrayItem, | |
30 public IMEObserver, | |
31 public AccessibilityObserver, | |
32 public VirtualKeyboardObserver { | |
33 public: | |
34 explicit TrayIME(SystemTray* system_tray); | |
35 ~TrayIME() override; | |
36 | |
37 // Overridden from VirtualKeyboardObserver. | |
38 void OnKeyboardSuppressionChanged(bool suppressed) override; | |
39 | |
40 // Overridden from AccessibilityObserver: | |
41 void OnAccessibilityModeChanged( | |
42 ui::AccessibilityNotificationVisibility notify) override; | |
43 | |
44 private: | |
45 friend class TrayIMETest; | |
46 | |
47 // Repopulates the DefaultView and DetailedView. | |
48 void Update(); | |
49 // Updates the System Tray label. | |
50 void UpdateTrayLabel(const IMEInfo& info, size_t count); | |
51 // Returns whether the virtual keyboard toggle should be shown in the | |
52 // detailed view. | |
53 bool ShouldShowKeyboardToggle(); | |
54 // Returns the appropriate label for the detailed view. | |
55 base::string16 GetDefaultViewLabel(bool show_ime_label); | |
56 | |
57 // Overridden from SystemTrayItem. | |
58 views::View* CreateTrayView(user::LoginStatus status) override; | |
59 views::View* CreateDefaultView(user::LoginStatus status) override; | |
60 views::View* CreateDetailedView(user::LoginStatus status) override; | |
61 void DestroyTrayView() override; | |
62 void DestroyDefaultView() override; | |
63 void DestroyDetailedView() override; | |
64 void UpdateAfterLoginStatusChange(user::LoginStatus status) override; | |
65 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override; | |
66 | |
67 // Overridden from IMEObserver. | |
68 void OnIMERefresh() override; | |
69 | |
70 // Whether the default view should be shown. | |
71 bool ShouldDefaultViewBeVisible(); | |
72 | |
73 TrayItemView* tray_label_; | |
74 tray::IMEDefaultView* default_; | |
75 tray::IMEDetailedView* detailed_; | |
76 // Whether the virtual keyboard is suppressed. | |
77 bool keyboard_suppressed_; | |
78 // Cached IME info. | |
79 IMEInfoList ime_list_; | |
80 IMEInfo current_ime_; | |
81 IMEPropertyInfoList property_list_; | |
82 | |
83 DISALLOW_COPY_AND_ASSIGN(TrayIME); | |
84 }; | |
85 | |
86 } // namespace ash | |
87 | |
88 #endif // ASH_SYSTEM_IME_TRAY_IME_CHROMEOS_H_ | |
OLD | NEW |