Chromium Code Reviews| Index: ash/common/system/chromeos/ime_menu/ime_list_view.h |
| diff --git a/ash/common/system/chromeos/ime_menu/ime_list_view.h b/ash/common/system/chromeos/ime_menu/ime_list_view.h |
| index 745a8348f7669234562d312b1d7ccd2c26b8bc17..ff98c8365554821a53e8a4953163cac1208784eb 100644 |
| --- a/ash/common/system/chromeos/ime_menu/ime_list_view.h |
| +++ b/ash/common/system/chromeos/ime_menu/ime_list_view.h |
| @@ -37,6 +37,19 @@ class ImeListView : public TrayDetailsView { |
| // Removes (and destroys) all child views. |
| virtual void ResetImeListView(); |
| + // Closes the view. |
| + void CloseImeListView(); |
| + |
| + void SetLastItemSelectedWithKeyboard(bool last_item_selected_with_keyboard) { |
|
tdanderson
2016/12/08 22:56:38
Please use this_naming_style() instead of CamelCas
Azure Wei
2016/12/09 00:23:54
Done. Renamed as set_last_item_selected_with_keybo
|
| + last_item_selected_with_keyboard_ = last_item_selected_with_keyboard; |
| + } |
| + |
| + void SetFocusCurrentIme(const bool focus_current_ime) { |
| + focus_current_ime_ = focus_current_ime; |
|
tdanderson
2016/12/08 22:56:38
I find the name |focus_current_ime_| a bit ambiguo
Azure Wei
2016/12/09 00:23:54
Done.
|
| + } |
| + |
| + bool focus_current_ime() const { return focus_current_ime_; } |
| + |
| // TrayDetailsView: |
| void HandleViewClicked(views::View* view) override; |
| void HandleButtonPressed(views::Button* sender, |
| @@ -64,6 +77,10 @@ class ImeListView : public TrayDetailsView { |
| // Inserts the material on-screen keyboard status in the detailed view. |
| void PrependMaterialKeyboardStatus(); |
| + // Requests focus on the current IME if it was selected with keyboard so that |
| + // accessible text will alert the user of the IME change. |
| + void FocusCurrentImeIfNeeded(); |
| + |
| std::map<views::View*, std::string> ime_map_; |
| std::map<views::View*, std::string> property_map_; |
| // On-screen keyboard view which is not used in material design. |
| @@ -71,6 +88,17 @@ class ImeListView : public TrayDetailsView { |
| // On-screen keyboard view which is only used in material design. |
| MaterialKeyboardStatusRowView* material_keyboard_status_view_; |
| + // The id of the last item selected with keyboard. It will be empty if the |
| + // item is not selected with keyboard. |
| + std::string last_selected_item_id_; |
| + |
| + // True if the last item is selected with keyboard. |
| + bool last_item_selected_with_keyboard_; |
| + |
| + // True if supporting automatically focus to the selected IME when switching |
| + // with keyboard. |
|
tdanderson
2016/12/08 22:56:38
nit: suggested wording: "True if focus should be r
Azure Wei
2016/12/09 00:23:54
Done.
|
| + bool focus_current_ime_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ImeListView); |
| }; |