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

Unified Diff: ash/common/system/chromeos/ime_menu/ime_list_view.h

Issue 2560793002: Request focus on IME menu rows after keyboard selection (Closed)
Patch Set: Addressed comments. Created 4 years 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..143337b8e564750724ec213032c3a4d691a25f5e 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,23 @@ class ImeListView : public TrayDetailsView {
// Removes (and destroys) all child views.
virtual void ResetImeListView();
+ // Closes the view.
+ void CloseImeListView();
+
+ void set_last_item_selected_with_keyboard(
+ bool last_item_selected_with_keyboard) {
+ last_item_selected_with_keyboard_ = last_item_selected_with_keyboard;
+ }
+
+ void set_should_focus_ime_after_selection_with_keyboard(
+ const bool focus_current_ime) {
+ should_focus_ime_after_selection_with_keyboard_ = focus_current_ime;
+ }
+
+ bool should_focus_ime_after_selection_with_keyboard() const {
+ return should_focus_ime_after_selection_with_keyboard_;
+ }
+
// TrayDetailsView:
void HandleViewClicked(views::View* view) override;
void HandleButtonPressed(views::Button* sender,
@@ -64,6 +81,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 +92,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 focus should be requested after switching IMEs with keyboard in
+ // order to trigger spoken feedback with ChromeVox enabled.
+ bool should_focus_ime_after_selection_with_keyboard_;
+
DISALLOW_COPY_AND_ASSIGN(ImeListView);
};
« 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