| 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 #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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |