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

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

Issue 2469663002: [ash-md] Add on-screen keyboard toggle row in IME menu view. (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
tdanderson 2016/11/01 21:42:12 Regarding the shadow, Evan is currently working on
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 11
11 namespace ash { 12 namespace ash {
12 // The detailed view for showing IME list. 13 // The detailed view for showing IME list.
13 class ImeListView : public TrayDetailsView { 14 class ImeListView : public TrayDetailsView {
14 public: 15 public:
15 enum SingleImeBehavior { 16 enum SingleImeBehavior {
16 // Shows the IME menu if there's only one IME in system. 17 // Shows the IME menu if there's only one IME in system.
17 SHOW_SINGLE_IME, 18 SHOW_SINGLE_IME,
18 // Hides the IME menu if there's only one IME in system. 19 // Hides the IME menu if there's only one IME in system.
19 HIDE_SINGLE_IME 20 HIDE_SINGLE_IME
20 }; 21 };
21 22
22 ImeListView(SystemTrayItem* owner, 23 ImeListView(SystemTrayItem* owner,
23 bool show_keyboard_toggle, 24 bool show_keyboard_toggle,
24 SingleImeBehavior single_ime_behavior); 25 SingleImeBehavior single_ime_behavior);
25 26
26 ~ImeListView() override; 27 ~ImeListView() override;
27 28
28 // Updates the view. 29 // Updates the view.
29 virtual void Update(const IMEInfoList& list, 30 virtual void Update(const IMEInfoList& list,
30 const IMEPropertyInfoList& property_list, 31 const IMEPropertyInfoList& property_list,
31 bool show_keyboard_toggle, 32 bool show_keyboard_toggle,
32 SingleImeBehavior single_ime_behavior); 33 SingleImeBehavior single_ime_behavior);
33 34
34 // TrayDetailsView: 35 // TrayDetailsView:
35 void HandleViewClicked(views::View* view) override; 36 void HandleViewClicked(views::View* view) override;
36 37
38 // views::ButtonListener:
39 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
40
37 private: 41 private:
42 class MaterialKeyboardStatusRowView;
43
38 // To allow the test class to access |ime_map_|. 44 // To allow the test class to access |ime_map_|.
39 friend class ImeMenuTrayTest; 45 friend class ImeMenuTrayTest;
40 46
41 // Appends the IMEs to the scrollable area of the detailed view. 47 // Appends the IMEs to the scrollable area of the detailed view.
42 void AppendIMEList(const IMEInfoList& list); 48 void AppendIMEList(const IMEInfoList& list);
43 49
44 // Appends the IME listed to the scrollable area of the detailed view. 50 // Appends the IME listed to the scrollable area of the detailed view.
45 void AppendIMEProperties(const IMEPropertyInfoList& property_list); 51 void AppendIMEProperties(const IMEPropertyInfoList& property_list);
46 52
47 // Appends the IMEs and properties to the scrollable area in the material 53 // Appends the IMEs and properties to the scrollable area in the material
48 // design IME menu. 54 // design IME menu.
49 void AppendImeListAndProperties(const IMEInfoList& list, 55 void AppendImeListAndProperties(const IMEInfoList& list,
50 const IMEPropertyInfoList& property_list); 56 const IMEPropertyInfoList& property_list);
51 57
52 // Appends the on-screen keyboard status to the last area of the detailed 58 // Appends the on-screen keyboard status to the last area of the detailed
53 // view. 59 // view.
54 void AppendKeyboardStatus(); 60 void AppendKeyboardStatus();
55 61
62 // Appends the meterial on-screen keyboard status to the top area of the
63 // detailed view.
64 void AppendMaterialKeyboardStatus();
65
56 std::map<views::View*, std::string> ime_map_; 66 std::map<views::View*, std::string> ime_map_;
57 std::map<views::View*, std::string> property_map_; 67 std::map<views::View*, std::string> property_map_;
58 views::View* keyboard_status_; 68 views::View* keyboard_status_;
69 MaterialKeyboardStatusRowView* material_keyboard_statuts_view_;
59 70
60 DISALLOW_COPY_AND_ASSIGN(ImeListView); 71 DISALLOW_COPY_AND_ASSIGN(ImeListView);
61 }; 72 };
62 73
63 } // namespace ash 74 } // namespace ash
64 75
65 #endif // ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_LIST_VIEW_H_ 76 #endif // ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_LIST_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698