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

Side by Side Diff: ui/app_list/views/apps_grid_view.cc

Issue 1958673002: Fix accessibility event type fired from AppsGridView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/app_list/views/apps_grid_view.h" 5 #include "ui/app_list/views/apps_grid_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 if (!new_selection) 1111 if (!new_selection)
1112 return; // Keep current selection. 1112 return; // Keep current selection.
1113 1113
1114 if (selected_view_) 1114 if (selected_view_)
1115 selected_view_->SchedulePaint(); 1115 selected_view_->SchedulePaint();
1116 1116
1117 EnsureViewVisible(index); 1117 EnsureViewVisible(index);
1118 selected_view_ = new_selection; 1118 selected_view_ = new_selection;
1119 selected_view_->SetTitleSubpixelAA(); 1119 selected_view_->SetTitleSubpixelAA();
1120 selected_view_->SchedulePaint(); 1120 selected_view_->SchedulePaint();
1121 selected_view_->NotifyAccessibilityEvent( 1121 selected_view_->NotifyAccessibilityEvent(ui::AX_EVENT_SELECTION, true);
1122 ui::AX_EVENT_FOCUS, true);
1123 } 1122 }
1124 1123
1125 bool AppsGridView::IsValidIndex(const Index& index) const { 1124 bool AppsGridView::IsValidIndex(const Index& index) const {
1126 return index.page >= 0 && index.page < pagination_model_.total_pages() && 1125 return index.page >= 0 && index.page < pagination_model_.total_pages() &&
1127 index.slot >= 0 && index.slot < tiles_per_page() && 1126 index.slot >= 0 && index.slot < tiles_per_page() &&
1128 GetModelIndexFromIndex(index) < view_model_.view_size(); 1127 GetModelIndexFromIndex(index) < view_model_.view_size();
1129 } 1128 }
1130 1129
1131 AppsGridView::Index AppsGridView::GetIndexOfView( 1130 AppsGridView::Index AppsGridView::GetIndexOfView(
1132 const AppListItemView* view) const { 1131 const AppListItemView* view) const {
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
2183 2182
2184 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, 2183 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index,
2185 bool is_target_folder) { 2184 bool is_target_folder) {
2186 AppListItemView* target_view = 2185 AppListItemView* target_view =
2187 GetViewDisplayedAtSlotOnCurrentPage(target_index.slot); 2186 GetViewDisplayedAtSlotOnCurrentPage(target_index.slot);
2188 if (target_view) 2187 if (target_view)
2189 target_view->SetAsAttemptedFolderTarget(is_target_folder); 2188 target_view->SetAsAttemptedFolderTarget(is_target_folder);
2190 } 2189 }
2191 2190
2192 } // namespace app_list 2191 } // namespace app_list
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