Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: ash/common/system/chromeos/ime_menu/ime_list_view.h

Issue 2673333002: Fix regression where no IMEs appear in the opt-in IME menu (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ash/common/system/chromeos/ime_menu/ime_list_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | ash/common/system/chromeos/ime_menu/ime_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698