OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_COMMON_SYSTEM_IME_TRAY_IME_CHROMEOS_H_ | 5 #ifndef ASH_COMMON_SYSTEM_IME_TRAY_IME_CHROMEOS_H_ |
6 #define ASH_COMMON_SYSTEM_IME_TRAY_IME_CHROMEOS_H_ | 6 #define ASH_COMMON_SYSTEM_IME_TRAY_IME_CHROMEOS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "ash/common/system/accessibility_observer.h" | 10 #include "ash/common/system/accessibility_observer.h" |
| 11 #include "ash/common/system/chromeos/ime_menu/ime_list_view.h" |
11 #include "ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_observer.
h" | 12 #include "ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_observer.
h" |
12 #include "ash/common/system/ime/ime_observer.h" | 13 #include "ash/common/system/ime/ime_observer.h" |
13 #include "ash/common/system/tray/ime_info.h" | 14 #include "ash/common/system/tray/ime_info.h" |
14 #include "ash/common/system/tray/system_tray_item.h" | 15 #include "ash/common/system/tray/system_tray_item.h" |
15 #include "base/macros.h" | 16 #include "base/macros.h" |
16 | 17 |
17 namespace ash { | 18 namespace ash { |
18 | 19 |
19 namespace tray { | 20 namespace tray { |
20 class IMEDefaultView; | 21 class IMEDefaultView; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 void DestroyTrayView() override; | 59 void DestroyTrayView() override; |
59 void DestroyDefaultView() override; | 60 void DestroyDefaultView() override; |
60 void DestroyDetailedView() override; | 61 void DestroyDetailedView() override; |
61 void UpdateAfterLoginStatusChange(LoginStatus status) override; | 62 void UpdateAfterLoginStatusChange(LoginStatus status) override; |
62 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override; | 63 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override; |
63 | 64 |
64 // Overridden from IMEObserver. | 65 // Overridden from IMEObserver. |
65 void OnIMERefresh() override; | 66 void OnIMERefresh() override; |
66 void OnIMEMenuActivationChanged(bool is_active) override; | 67 void OnIMEMenuActivationChanged(bool is_active) override; |
67 | 68 |
| 69 // Returns true input methods are managed by policy. |
| 70 bool IsIMEManaged(); |
| 71 |
68 // Whether the default view should be shown. | 72 // Whether the default view should be shown. |
69 bool ShouldDefaultViewBeVisible(); | 73 bool ShouldDefaultViewBeVisible(); |
70 | 74 |
| 75 // Decides if a tray icon should be shown. |
| 76 bool ShouldShowImeTrayItem(size_t ime_count); |
| 77 // Mandates behavior for the single IME case for the detailed IME list |
| 78 // sub-view. |
| 79 ImeListView::SingleImeBehavior GetSingleImeBehavior(); |
| 80 |
71 TrayItemView* tray_label_; | 81 TrayItemView* tray_label_; |
72 tray::IMEDefaultView* default_; | 82 tray::IMEDefaultView* default_; |
73 tray::IMEDetailedView* detailed_; | 83 tray::IMEDetailedView* detailed_; |
74 // Whether the virtual keyboard is suppressed. | 84 // Whether the virtual keyboard is suppressed. |
75 bool keyboard_suppressed_; | 85 bool keyboard_suppressed_; |
76 // Cached IME info. | 86 // Cached IME info. |
77 IMEInfoList ime_list_; | 87 IMEInfoList ime_list_; |
78 IMEInfo current_ime_; | 88 IMEInfo current_ime_; |
79 IMEPropertyInfoList property_list_; | 89 IMEPropertyInfoList property_list_; |
| 90 // If non-empty, a controlled-setting icon should be displayed with a tooltip |
| 91 // text defined by this string. |
| 92 base::string16 ime_managed_message_; |
| 93 |
80 // Whether the IME label and tray items should be visible. | 94 // Whether the IME label and tray items should be visible. |
81 bool is_visible_; | 95 bool is_visible_; |
82 | 96 |
83 DISALLOW_COPY_AND_ASSIGN(TrayIME); | 97 DISALLOW_COPY_AND_ASSIGN(TrayIME); |
84 }; | 98 }; |
85 | 99 |
86 } // namespace ash | 100 } // namespace ash |
87 | 101 |
88 #endif // ASH_COMMON_SYSTEM_IME_TRAY_IME_CHROMEOS_H_ | 102 #endif // ASH_COMMON_SYSTEM_IME_TRAY_IME_CHROMEOS_H_ |
OLD | NEW |