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

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

Issue 1693713004: Don't fire a FOCUS accessibility event on a View that doesn't have focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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/search_result_list_view.h" 5 #include "ui/app_list/views/search_result_list_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 if (old_selected >= 0) { 185 if (old_selected >= 0) {
186 SearchResultView* selected_view = GetResultViewAt(old_selected); 186 SearchResultView* selected_view = GetResultViewAt(old_selected);
187 selected_view->ClearSelectedAction(); 187 selected_view->ClearSelectedAction();
188 selected_view->SchedulePaint(); 188 selected_view->SchedulePaint();
189 } 189 }
190 190
191 if (new_selected >= 0) { 191 if (new_selected >= 0) {
192 SearchResultView* selected_view = GetResultViewAt(new_selected); 192 SearchResultView* selected_view = GetResultViewAt(new_selected);
193 selected_view->ClearSelectedAction(); 193 selected_view->ClearSelectedAction();
194 selected_view->SchedulePaint(); 194 selected_view->SchedulePaint();
195 selected_view->NotifyAccessibilityEvent(ui::AX_EVENT_FOCUS, true); 195 selected_view->NotifyAccessibilityEvent(ui::AX_EVENT_SELECTION, true);
sky 2016/02/14 16:21:52 I believe this function is always called when the
dmazzoni 2016/02/17 00:25:18 We need to fire the selection on a particular item
196 } 196 }
197 } 197 }
198 198
199 void SearchResultListView::ForceAutoLaunchForTest() { 199 void SearchResultListView::ForceAutoLaunchForTest() {
200 if (auto_launch_animation_) 200 if (auto_launch_animation_)
201 AnimationEnded(auto_launch_animation_.get()); 201 AnimationEnded(auto_launch_animation_.get());
202 } 202 }
203 203
204 void SearchResultListView::Layout() { 204 void SearchResultListView::Layout() {
205 results_container_->SetBoundsRect(GetLocalBounds()); 205 results_container_->SetBoundsRect(GetLocalBounds());
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 view->result(), action_index, event_flags); 257 view->result(), action_index, event_flags);
258 } 258 }
259 } 259 }
260 260
261 void SearchResultListView::OnSearchResultInstalled(SearchResultView* view) { 261 void SearchResultListView::OnSearchResultInstalled(SearchResultView* view) {
262 if (delegate_ && view->result()) 262 if (delegate_ && view->result())
263 delegate_->OnResultInstalled(view->result()); 263 delegate_->OnResultInstalled(view->result());
264 } 264 }
265 265
266 } // namespace app_list 266 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698