OLD | NEW |
---|---|
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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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::SendFocusAlert() const { |
216 window_label_button_view_->NotifyAccessibilityEvent(ui::AX_EVENT_FOCUS, true); | 216 window_label_button_view_->NotifyAccessibilityEvent( |
217 ui::AX_EVENT_SELECTION, true); | |
sky
2016/02/14 16:21:52
If the name of this method is correct, why send se
dmazzoni
2016/02/17 00:25:18
The name isn't right, the view isn't actually focu
| |
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 Loading... | |
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 |
OLD | NEW |