| 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/ash_export.h" |
| 8 #include "ash/common/system/tray/ime_info.h" | 9 #include "ash/common/system/tray/ime_info.h" |
| 9 #include "ash/common/system/tray/tray_details_view.h" | 10 #include "ash/common/system/tray/tray_details_view.h" |
| 10 #include "ui/views/controls/button/button.h" | 11 #include "ui/views/controls/button/button.h" |
| 11 | 12 |
| 12 namespace ash { | 13 namespace ash { |
| 13 class MaterialKeyboardStatusRowView; | 14 class MaterialKeyboardStatusRowView; |
| 14 | 15 |
| 15 // The detailed view for showing IME list. | 16 // The detailed view for showing IME list. |
| 16 class ImeListView : public TrayDetailsView { | 17 class ImeListView : public TrayDetailsView { |
| 17 public: | 18 public: |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 57 |
| 57 // TrayDetailsView: | 58 // TrayDetailsView: |
| 58 void HandleViewClicked(views::View* view) override; | 59 void HandleViewClicked(views::View* view) override; |
| 59 void HandleButtonPressed(views::Button* sender, | 60 void HandleButtonPressed(views::Button* sender, |
| 60 const ui::Event& event) override; | 61 const ui::Event& event) override; |
| 61 | 62 |
| 62 // views::View: | 63 // views::View: |
| 63 void VisibilityChanged(View* starting_from, bool is_visible) override; | 64 void VisibilityChanged(View* starting_from, bool is_visible) override; |
| 64 | 65 |
| 65 private: | 66 private: |
| 66 // To allow the test class to access |ime_map_|. | 67 friend class ImeListViewTestApi; |
| 67 friend class ImeMenuTrayTest; | |
| 68 | 68 |
| 69 // Appends the IMEs to the scrollable area of the detailed view. | 69 // Appends the IMEs to the scrollable area of the detailed view. |
| 70 void AppendIMEList(const IMEInfoList& list); | 70 void AppendIMEList(const IMEInfoList& list); |
| 71 | 71 |
| 72 // Appends the IME listed to the scrollable area of the detailed view. | 72 // Appends the IME listed to the scrollable area of the detailed view. |
| 73 void AppendIMEProperties(const IMEPropertyInfoList& property_list); | 73 void AppendIMEProperties(const IMEPropertyInfoList& property_list); |
| 74 | 74 |
| 75 // Appends the IMEs and properties to the scrollable area in the material | 75 // Appends the IMEs and properties to the scrollable area in the material |
| 76 // design IME menu. | 76 // design IME menu. |
| 77 void AppendImeListAndProperties(const IMEInfoList& list, | 77 void AppendImeListAndProperties(const IMEInfoList& list, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 105 // True if focus should be requested after switching IMEs with keyboard in | 105 // True if focus should be requested after switching IMEs with keyboard in |
| 106 // order to trigger spoken feedback with ChromeVox enabled. | 106 // order to trigger spoken feedback with ChromeVox enabled. |
| 107 bool should_focus_ime_after_selection_with_keyboard_; | 107 bool should_focus_ime_after_selection_with_keyboard_; |
| 108 | 108 |
| 109 // The item view of the current selected IME. | 109 // The item view of the current selected IME. |
| 110 views::View* current_ime_view_; | 110 views::View* current_ime_view_; |
| 111 | 111 |
| 112 DISALLOW_COPY_AND_ASSIGN(ImeListView); | 112 DISALLOW_COPY_AND_ASSIGN(ImeListView); |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 class ASH_EXPORT ImeListViewTestApi { |
| 116 public: |
| 117 explicit ImeListViewTestApi(ImeListView* ime_list_view); |
| 118 virtual ~ImeListViewTestApi(); |
| 119 |
| 120 views::View* GetToggleView() const; |
| 121 |
| 122 const std::map<views::View*, std::string>& ime_map() const { |
| 123 return ime_list_view_->ime_map_; |
| 124 } |
| 125 |
| 126 private: |
| 127 ImeListView* ime_list_view_; |
| 128 |
| 129 DISALLOW_COPY_AND_ASSIGN(ImeListViewTestApi); |
| 130 }; |
| 131 |
| 115 } // namespace ash | 132 } // namespace ash |
| 116 | 133 |
| 117 #endif // ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_LIST_VIEW_H_ | 134 #endif // ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_LIST_VIEW_H_ |
| OLD | NEW |