Chromium Code Reviews| 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. |
|
tdanderson
2016/11/22 21:16:39
nit: Can you include a bit more of an explanation
| |
| 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; |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 27 SingleImeBehavior single_ime_behavior); | 27 SingleImeBehavior single_ime_behavior); |
| 28 | 28 |
| 29 ~ImeListView() override; | 29 ~ImeListView() override; |
| 30 | 30 |
| 31 // Updates the view. | 31 // Updates the view. |
| 32 virtual void Update(const IMEInfoList& list, | 32 virtual void Update(const IMEInfoList& list, |
| 33 const IMEPropertyInfoList& property_list, | 33 const IMEPropertyInfoList& property_list, |
| 34 bool show_keyboard_toggle, | 34 bool show_keyboard_toggle, |
| 35 SingleImeBehavior single_ime_behavior); | 35 SingleImeBehavior single_ime_behavior); |
| 36 | 36 |
| 37 // Removes (and destroys) all child views. | |
| 38 virtual void ResetImeListView(); | |
| 39 | |
| 37 // TrayDetailsView: | 40 // TrayDetailsView: |
| 38 void HandleViewClicked(views::View* view) override; | 41 void HandleViewClicked(views::View* view) override; |
| 39 void HandleButtonPressed(views::Button* sender, | 42 void HandleButtonPressed(views::Button* sender, |
| 40 const ui::Event& event) override; | 43 const ui::Event& event) override; |
| 41 | 44 |
| 42 private: | 45 private: |
| 43 // To allow the test class to access |ime_map_|. | 46 // To allow the test class to access |ime_map_|. |
| 44 friend class ImeMenuTrayTest; | 47 friend class ImeMenuTrayTest; |
| 45 | 48 |
| 46 // Removes (and destroys) all child views. | |
| 47 void ResetImeListView(); | |
| 48 | |
| 49 // Appends the IMEs to the scrollable area of the detailed view. | 49 // Appends the IMEs to the scrollable area of the detailed view. |
| 50 void AppendIMEList(const IMEInfoList& list); | 50 void AppendIMEList(const IMEInfoList& list); |
| 51 | 51 |
| 52 // Appends the IME listed to the scrollable area of the detailed view. | 52 // Appends the IME listed to the scrollable area of the detailed view. |
| 53 void AppendIMEProperties(const IMEPropertyInfoList& property_list); | 53 void AppendIMEProperties(const IMEPropertyInfoList& property_list); |
| 54 | 54 |
| 55 // Appends the IMEs and properties to the scrollable area in the material | 55 // Appends the IMEs and properties to the scrollable area in the material |
| 56 // design IME menu. | 56 // design IME menu. |
| 57 void AppendImeListAndProperties(const IMEInfoList& list, | 57 void AppendImeListAndProperties(const IMEInfoList& list, |
| 58 const IMEPropertyInfoList& property_list); | 58 const IMEPropertyInfoList& property_list); |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 70 views::View* keyboard_status_; | 70 views::View* keyboard_status_; |
| 71 // On-screen keyboard view which is only used in material design. | 71 // On-screen keyboard view which is only used in material design. |
| 72 MaterialKeyboardStatusRowView* material_keyboard_status_view_; | 72 MaterialKeyboardStatusRowView* material_keyboard_status_view_; |
| 73 | 73 |
| 74 DISALLOW_COPY_AND_ASSIGN(ImeListView); | 74 DISALLOW_COPY_AND_ASSIGN(ImeListView); |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace ash | 77 } // namespace ash |
| 78 | 78 |
| 79 #endif // ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_LIST_VIEW_H_ | 79 #endif // ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_LIST_VIEW_H_ |
| OLD | NEW |