| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_CHROMEOS_IME_MENU_IME_LIST_VIEW_H_ | 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_LIST_VIEW_H_ |
| 6 #define ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_LIST_VIEW_H_ | 6 #define ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_LIST_VIEW_H_ |
| 7 | 7 |
| 8 #include "ash/common/system/tray/ime_info.h" | 8 #include "ash/common/system/tray/ime_info.h" |
| 9 #include "ash/common/system/tray/tray_details_view.h" | 9 #include "ash/common/system/tray/tray_details_view.h" |
| 10 #include "ui/views/controls/button/button.h" | 10 #include "ui/views/controls/button/button.h" |
| 11 | 11 |
| 12 namespace ash { | 12 namespace ash { |
| 13 class MaterialKeyboardStatusRowView; | 13 class MaterialKeyboardStatusRowView; |
| 14 | 14 |
| 15 // The detailed view for showing IME list. | 15 // The detailed view for showing IME list. |
| 16 class ImeListView : public TrayDetailsView { | 16 class ImeListView : public TrayDetailsView { |
| 17 public: | 17 public: |
| 18 enum SingleImeBehavior { | 18 enum SingleImeBehavior { |
| 19 // Shows the IME menu if there's only one IME in system. | 19 // Shows the IME menu if there's only one IME in system. |
| 20 SHOW_SINGLE_IME, | 20 SHOW_SINGLE_IME, |
| 21 // Hides the IME menu if there's only one IME in system. | 21 // Hides the IME menu if there's only one IME in system. |
| 22 HIDE_SINGLE_IME | 22 HIDE_SINGLE_IME |
| 23 }; | 23 }; |
| 24 | 24 |
| 25 ImeListView(SystemTrayItem* owner, | 25 ImeListView(SystemTrayItem* owner); |
| 26 bool show_keyboard_toggle, | |
| 27 SingleImeBehavior single_ime_behavior); | |
| 28 | 26 |
| 29 ~ImeListView() override; | 27 ~ImeListView() override; |
| 30 | 28 |
| 29 // Initializes the contents of a newly-instantiated ImeListView. |
| 30 void Init(bool show_keyboard_toggle, SingleImeBehavior single_ime_behavior); |
| 31 |
| 31 // Updates the view. | 32 // Updates the view. |
| 32 virtual void Update(const IMEInfoList& list, | 33 virtual void Update(const IMEInfoList& list, |
| 33 const IMEPropertyInfoList& property_list, | 34 const IMEPropertyInfoList& property_list, |
| 34 bool show_keyboard_toggle, | 35 bool show_keyboard_toggle, |
| 35 SingleImeBehavior single_ime_behavior); | 36 SingleImeBehavior single_ime_behavior); |
| 36 | 37 |
| 37 // Removes (and destroys) all child views. | 38 // Removes (and destroys) all child views. |
| 38 virtual void ResetImeListView(); | 39 virtual void ResetImeListView(); |
| 39 | 40 |
| 40 // Closes the view. | 41 // Closes the view. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 109 |
| 109 // The item view of the current selected IME. | 110 // The item view of the current selected IME. |
| 110 views::View* current_ime_view_; | 111 views::View* current_ime_view_; |
| 111 | 112 |
| 112 DISALLOW_COPY_AND_ASSIGN(ImeListView); | 113 DISALLOW_COPY_AND_ASSIGN(ImeListView); |
| 113 }; | 114 }; |
| 114 | 115 |
| 115 } // namespace ash | 116 } // namespace ash |
| 116 | 117 |
| 117 #endif // ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_LIST_VIEW_H_ | 118 #endif // ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_LIST_VIEW_H_ |
| OLD | NEW |