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

Side by Side Diff: chrome/browser/ui/views/autofill/password_generation_popup_view_views.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: Missed one call to SendFocusAlert 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/views/autofill/password_generation_popup_view_views. h" 5 #include "chrome/browser/ui/views/autofill/password_generation_popup_view_views. h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "chrome/browser/ui/autofill/password_generation_popup_controller.h" 9 #include "chrome/browser/ui/autofill/password_generation_popup_controller.h"
10 #include "chrome/browser/ui/autofill/popup_constants.h" 10 #include "chrome/browser/ui/autofill/popup_constants.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 void PasswordGenerationPopupViewViews::UpdateBoundsAndRedrawPopup() { 199 void PasswordGenerationPopupViewViews::UpdateBoundsAndRedrawPopup() {
200 DoUpdateBoundsAndRedrawPopup(); 200 DoUpdateBoundsAndRedrawPopup();
201 } 201 }
202 202
203 void PasswordGenerationPopupViewViews::PasswordSelectionUpdated() { 203 void PasswordGenerationPopupViewViews::PasswordSelectionUpdated() {
204 if (!password_view_) 204 if (!password_view_)
205 return; 205 return;
206 206
207 if (controller_->password_selected()) 207 if (controller_->password_selected())
208 NotifyAccessibilityEvent(ui::AX_EVENT_FOCUS, true); 208 NotifyAccessibilityEvent(ui::AX_EVENT_SELECTION, true);
209 209
210 password_view_->set_background( 210 password_view_->set_background(
211 views::Background::CreateSolidBackground( 211 views::Background::CreateSolidBackground(
212 controller_->password_selected() ? 212 controller_->password_selected() ?
213 kHoveredBackgroundColor : 213 kHoveredBackgroundColor :
214 kPopupBackground)); 214 kPopupBackground));
215 } 215 }
216 216
217 void PasswordGenerationPopupViewViews::Layout() { 217 void PasswordGenerationPopupViewViews::Layout() {
218 // Need to leave room for the border. 218 // Need to leave room for the border.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 return new PasswordGenerationPopupViewViews(controller, observing_widget); 279 return new PasswordGenerationPopupViewViews(controller, observing_widget);
280 } 280 }
281 281
282 void PasswordGenerationPopupViewViews::GetAccessibleState( 282 void PasswordGenerationPopupViewViews::GetAccessibleState(
283 ui::AXViewState* state) { 283 ui::AXViewState* state) {
284 state->name = controller_->SuggestedText(); 284 state->name = controller_->SuggestedText();
285 state->role = ui::AX_ROLE_MENU_ITEM; 285 state->role = ui::AX_ROLE_MENU_ITEM;
286 } 286 }
287 287
288 } // namespace autofill 288 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698