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

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

Issue 2549673003: Scroll IME list to visible when using tab key. (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "ash/common/system/chromeos/ime_menu/ime_list_view.h" 5 #include "ash/common/system/chromeos/ime_menu/ime_list_view.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/system/tray/hover_highlight_view.h" 8 #include "ash/common/system/tray/hover_highlight_view.h"
9 #include "ash/common/system/tray/ime_info.h" 9 #include "ash/common/system/tray/ime_info.h"
10 #include "ash/common/system/tray/system_menu_button.h" 10 #include "ash/common/system/tray/system_menu_button.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 137 }
138 138
139 ~ImeListItemView() override {} 139 ~ImeListItemView() override {}
140 140
141 // ActionableView: 141 // ActionableView:
142 bool PerformAction(const ui::Event& event) override { 142 bool PerformAction(const ui::Event& event) override {
143 ime_list_view_->HandleViewClicked(this); 143 ime_list_view_->HandleViewClicked(this);
144 return true; 144 return true;
145 } 145 }
146 146
147 void OnFocus() override {
148 ActionableView::OnFocus();
149 if (ime_list_view_ && ime_list_view_->scroll_content())
150 ime_list_view_->scroll_content()->ScrollRectToVisible(bounds());
151 }
152
147 // views::View: 153 // views::View:
148 void OnNativeThemeChanged(const ui::NativeTheme* theme) override { 154 void OnNativeThemeChanged(const ui::NativeTheme* theme) override {
149 UpdateStyle(); 155 UpdateStyle();
150 } 156 }
151 157
152 void GetAccessibleNodeData(ui::AXNodeData* node_data) override { 158 void GetAccessibleNodeData(ui::AXNodeData* node_data) override {
153 ActionableView::GetAccessibleNodeData(node_data); 159 ActionableView::GetAccessibleNodeData(node_data);
154 node_data->role = ui::AX_ROLE_CHECK_BOX; 160 node_data->role = ui::AX_ROLE_CHECK_BOX;
155 node_data->AddStateFlag(selected_ ? ui::AX_STATE_CHECKED 161 node_data->AddStateFlag(selected_ ? ui::AX_STATE_CHECKED
156 : ui::AX_STATE_NONE); 162 : ui::AX_STATE_NONE);
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 412
407 void ImeListView::HandleButtonPressed(views::Button* sender, 413 void ImeListView::HandleButtonPressed(views::Button* sender,
408 const ui::Event& event) { 414 const ui::Event& event) {
409 if (material_keyboard_status_view_ && 415 if (material_keyboard_status_view_ &&
410 sender == material_keyboard_status_view_->toggle()) { 416 sender == material_keyboard_status_view_->toggle()) {
411 WmShell::Get()->ToggleIgnoreExternalKeyboard(); 417 WmShell::Get()->ToggleIgnoreExternalKeyboard();
412 } 418 }
413 } 419 }
414 420
415 } // namespace ash 421 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698