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

Side by Side Diff: ash/wm/overview/window_selector_item.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ash/wm/overview/window_selector_item.h" 5 #include "ash/wm/overview/window_selector_item.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/screen_util.h" 10 #include "ash/screen_util.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 void WindowSelectorItem::RecomputeWindowTransforms() { 205 void WindowSelectorItem::RecomputeWindowTransforms() {
206 if (in_bounds_update_ || target_bounds_.IsEmpty()) 206 if (in_bounds_update_ || target_bounds_.IsEmpty())
207 return; 207 return;
208 base::AutoReset<bool> auto_reset_in_bounds_update(&in_bounds_update_, true); 208 base::AutoReset<bool> auto_reset_in_bounds_update(&in_bounds_update_, true);
209 gfx::Rect inset_bounds(target_bounds_); 209 gfx::Rect inset_bounds(target_bounds_);
210 inset_bounds.Inset(kWindowMargin, kWindowMargin); 210 inset_bounds.Inset(kWindowMargin, kWindowMargin);
211 SetItemBounds(inset_bounds, OverviewAnimationType::OVERVIEW_ANIMATION_NONE); 211 SetItemBounds(inset_bounds, OverviewAnimationType::OVERVIEW_ANIMATION_NONE);
212 UpdateCloseButtonLayout(OverviewAnimationType::OVERVIEW_ANIMATION_NONE); 212 UpdateCloseButtonLayout(OverviewAnimationType::OVERVIEW_ANIMATION_NONE);
213 } 213 }
214 214
215 void WindowSelectorItem::SendFocusAlert() const { 215 void WindowSelectorItem::SendAccessibleSelectionEvent() {
216 window_label_button_view_->NotifyAccessibilityEvent(ui::AX_EVENT_FOCUS, true); 216 window_label_button_view_->NotifyAccessibilityEvent(
217 ui::AX_EVENT_SELECTION, true);
217 } 218 }
218 219
219 void WindowSelectorItem::SetDimmed(bool dimmed) { 220 void WindowSelectorItem::SetDimmed(bool dimmed) {
220 dimmed_ = dimmed; 221 dimmed_ = dimmed;
221 SetOpacity(dimmed ? kDimmedItemOpacity : 1.0f); 222 SetOpacity(dimmed ? kDimmedItemOpacity : 1.0f);
222 } 223 }
223 224
224 void WindowSelectorItem::ButtonPressed(views::Button* sender, 225 void WindowSelectorItem::ButtonPressed(views::Button* sender,
225 const ui::Event& event) { 226 const ui::Event& event) {
226 if (sender == close_button_) { 227 if (sender == close_button_) {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 close_button_transform); 348 close_button_transform);
348 } 349 }
349 350
350 void WindowSelectorItem::UpdateCloseButtonAccessibilityName() { 351 void WindowSelectorItem::UpdateCloseButtonAccessibilityName() {
351 close_button_->SetAccessibleName(l10n_util::GetStringFUTF16( 352 close_button_->SetAccessibleName(l10n_util::GetStringFUTF16(
352 IDS_ASH_OVERVIEW_CLOSE_ITEM_BUTTON_ACCESSIBLE_NAME, 353 IDS_ASH_OVERVIEW_CLOSE_ITEM_BUTTON_ACCESSIBLE_NAME,
353 GetWindow()->title())); 354 GetWindow()->title()));
354 } 355 }
355 356
356 } // namespace ash 357 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698