| 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/system/ime_menu/ime_list_view.h" | 5 #include "ash/system/ime_menu/ime_list_view.h" |
| 6 | 6 |
| 7 #include "ash/ime/ime_switch_type.h" | 7 #include "ash/ime/ime_switch_type.h" |
| 8 #include "ash/resources/grit/ash_resources.h" | 8 #include "ash/resources/grit/ash_resources.h" |
| 9 #include "ash/resources/vector_icons/vector_icons.h" | 9 #include "ash/resources/vector_icons/vector_icons.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 void OnFocus() override { | 118 void OnFocus() override { |
| 119 ActionableView::OnFocus(); | 119 ActionableView::OnFocus(); |
| 120 if (ime_list_view_) | 120 if (ime_list_view_) |
| 121 ime_list_view_->ScrollItemToVisible(this); | 121 ime_list_view_->ScrollItemToVisible(this); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void GetAccessibleNodeData(ui::AXNodeData* node_data) override { | 124 void GetAccessibleNodeData(ui::AXNodeData* node_data) override { |
| 125 ActionableView::GetAccessibleNodeData(node_data); | 125 ActionableView::GetAccessibleNodeData(node_data); |
| 126 node_data->role = ui::AX_ROLE_CHECK_BOX; | 126 node_data->role = ui::AX_ROLE_CHECK_BOX; |
| 127 const ui::AXCheckedState checked_state = | 127 const ui::AXButtonState checked_state = |
| 128 selected_ ? ui::AX_CHECKED_STATE_TRUE : ui::AX_CHECKED_STATE_FALSE; | 128 selected_ ? ui::AX_BUTTON_STATE_TRUE : ui::AX_BUTTON_STATE_FALSE; |
| 129 node_data->AddIntAttribute(ui::AX_ATTR_CHECKED_STATE, checked_state); | 129 node_data->AddIntAttribute(ui::AX_ATTR_CHECKED_STATE, checked_state); |
| 130 } | 130 } |
| 131 | 131 |
| 132 private: | 132 private: |
| 133 ImeListView* ime_list_view_; | 133 ImeListView* ime_list_view_; |
| 134 bool selected_; | 134 bool selected_; |
| 135 | 135 |
| 136 DISALLOW_COPY_AND_ASSIGN(ImeListItemView); | 136 DISALLOW_COPY_AND_ASSIGN(ImeListItemView); |
| 137 }; | 137 }; |
| 138 | 138 |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 ImeListViewTestApi::ImeListViewTestApi(ImeListView* ime_list_view) | 363 ImeListViewTestApi::ImeListViewTestApi(ImeListView* ime_list_view) |
| 364 : ime_list_view_(ime_list_view) {} | 364 : ime_list_view_(ime_list_view) {} |
| 365 | 365 |
| 366 ImeListViewTestApi::~ImeListViewTestApi() {} | 366 ImeListViewTestApi::~ImeListViewTestApi() {} |
| 367 | 367 |
| 368 views::View* ImeListViewTestApi::GetToggleView() const { | 368 views::View* ImeListViewTestApi::GetToggleView() const { |
| 369 return ime_list_view_->keyboard_status_row_->toggle(); | 369 return ime_list_view_->keyboard_status_row_->toggle(); |
| 370 } | 370 } |
| 371 | 371 |
| 372 } // namespace ash | 372 } // namespace ash |
| OLD | NEW |