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

Side by Side Diff: chrome/browser/ui/autofill/autofill_popup_controller_impl.cc

Issue 2670003002: Accessibility for Autofill Popup View in native code (Closed)
Patch Set: Removes call to RequestFocus. RequestFocus fails because the widget is not active. Created 3 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 "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" 5 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 if (selected_line_ == selected_line) 394 if (selected_line_ == selected_line)
395 return; 395 return;
396 396
397 if (selected_line_ != kNoSelection && 397 if (selected_line_ != kNoSelection &&
398 static_cast<size_t>(selected_line_) < suggestions_.size()) 398 static_cast<size_t>(selected_line_) < suggestions_.size())
399 InvalidateRow(selected_line_); 399 InvalidateRow(selected_line_);
400 400
401 if (selected_line != kNoSelection) { 401 if (selected_line != kNoSelection) {
402 InvalidateRow(selected_line); 402 InvalidateRow(selected_line);
403 403
404 if (!CanAccept(suggestions_[selected_line].frontend_id)) 404 if (CanAccept(suggestions_[selected_line].frontend_id)) {
405 view_->NotifyAccessibilityEventForRow(ui::AX_EVENT_SELECTION,
406 selected_line);
407 } else {
405 selected_line = kNoSelection; 408 selected_line = kNoSelection;
409 }
406 } 410 }
407 411
408 selected_line_ = selected_line; 412 selected_line_ = selected_line;
409 413
410 if (selected_line_ != kNoSelection) { 414 if (selected_line_ != kNoSelection) {
411 delegate_->DidSelectSuggestion(suggestions_[selected_line_].value, 415 delegate_->DidSelectSuggestion(suggestions_[selected_line_].value,
412 suggestions_[selected_line_].frontend_id); 416 suggestions_[selected_line_].frontend_id);
413 } else { 417 } else {
414 delegate_->ClearPreviewedForm(); 418 delegate_->ClearPreviewedForm();
415 } 419 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 // Don't clear view_, because otherwise the popup will have to get regenerated 532 // Don't clear view_, because otherwise the popup will have to get regenerated
529 // and this will cause flickering. 533 // and this will cause flickering.
530 suggestions_.clear(); 534 suggestions_.clear();
531 elided_values_.clear(); 535 elided_values_.clear();
532 elided_labels_.clear(); 536 elided_labels_.clear();
533 537
534 selected_line_ = kNoSelection; 538 selected_line_ = kNoSelection;
535 } 539 }
536 540
537 } // namespace autofill 541 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698