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

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

Issue 1955383003: Merge to m51: Fix accessibility event type fired from AppsGridView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
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 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 if (!new_selection) 1109 if (!new_selection)
1110 return; // Keep current selection. 1110 return; // Keep current selection.
1111 1111
1112 if (selected_view_) 1112 if (selected_view_)
1113 selected_view_->SchedulePaint(); 1113 selected_view_->SchedulePaint();
1114 1114
1115 EnsureViewVisible(index); 1115 EnsureViewVisible(index);
1116 selected_view_ = new_selection; 1116 selected_view_ = new_selection;
1117 selected_view_->SetTitleSubpixelAA(); 1117 selected_view_->SetTitleSubpixelAA();
1118 selected_view_->SchedulePaint(); 1118 selected_view_->SchedulePaint();
1119 selected_view_->NotifyAccessibilityEvent( 1119 selected_view_->NotifyAccessibilityEvent(ui::AX_EVENT_SELECTION, true);
1120 ui::AX_EVENT_FOCUS, true);
1121 } 1120 }
1122 1121
1123 bool AppsGridView::IsValidIndex(const Index& index) const { 1122 bool AppsGridView::IsValidIndex(const Index& index) const {
1124 return index.page >= 0 && index.page < pagination_model_.total_pages() && 1123 return index.page >= 0 && index.page < pagination_model_.total_pages() &&
1125 index.slot >= 0 && index.slot < tiles_per_page() && 1124 index.slot >= 0 && index.slot < tiles_per_page() &&
1126 GetModelIndexFromIndex(index) < view_model_.view_size(); 1125 GetModelIndexFromIndex(index) < view_model_.view_size();
1127 } 1126 }
1128 1127
1129 AppsGridView::Index AppsGridView::GetIndexOfView( 1128 AppsGridView::Index AppsGridView::GetIndexOfView(
1130 const AppListItemView* view) const { 1129 const AppListItemView* view) const {
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
2184 2183
2185 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, 2184 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index,
2186 bool is_target_folder) { 2185 bool is_target_folder) {
2187 AppListItemView* target_view = 2186 AppListItemView* target_view =
2188 GetViewDisplayedAtSlotOnCurrentPage(target_index.slot); 2187 GetViewDisplayedAtSlotOnCurrentPage(target_index.slot);
2189 if (target_view) 2188 if (target_view)
2190 target_view->SetAsAttemptedFolderTarget(is_target_folder); 2189 target_view->SetAsAttemptedFolderTarget(is_target_folder);
2191 } 2190 }
2192 2191
2193 } // namespace app_list 2192 } // 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