| OLD | NEW |
| 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 "ash/wm/overview/window_grid.h" | 5 #include "ash/wm/overview/window_grid.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 : widget_(std::move(widget)) {} | 61 : widget_(std::move(widget)) {} |
| 62 | 62 |
| 63 CleanupWidgetAfterAnimationObserver::~CleanupWidgetAfterAnimationObserver() { | 63 CleanupWidgetAfterAnimationObserver::~CleanupWidgetAfterAnimationObserver() { |
| 64 } | 64 } |
| 65 | 65 |
| 66 void CleanupWidgetAfterAnimationObserver::OnImplicitAnimationsCompleted() { | 66 void CleanupWidgetAfterAnimationObserver::OnImplicitAnimationsCompleted() { |
| 67 delete this; | 67 delete this; |
| 68 } | 68 } |
| 69 | 69 |
| 70 // A comparator for locating a given target window. | 70 // A comparator for locating a given target window. |
| 71 struct WindowSelectorItemComparator | 71 struct WindowSelectorItemComparator { |
| 72 : public std::unary_function<WindowSelectorItem*, bool> { | |
| 73 explicit WindowSelectorItemComparator(const aura::Window* target_window) | 72 explicit WindowSelectorItemComparator(const aura::Window* target_window) |
| 74 : target(target_window) { | 73 : target(target_window) { |
| 75 } | 74 } |
| 76 | 75 |
| 77 bool operator()(WindowSelectorItem* window) const { | 76 bool operator()(WindowSelectorItem* window) const { |
| 78 return window->GetWindow() == target; | 77 return window->GetWindow() == target; |
| 79 } | 78 } |
| 80 | 79 |
| 81 const aura::Window* target; | 80 const aura::Window* target; |
| 82 }; | 81 }; |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); | 506 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
| 508 selection_widget_->SetBounds(SelectedWindow()->target_bounds()); | 507 selection_widget_->SetBounds(SelectedWindow()->target_bounds()); |
| 509 selection_widget_->SetOpacity(255); | 508 selection_widget_->SetOpacity(255); |
| 510 return; | 509 return; |
| 511 } | 510 } |
| 512 selection_widget_->SetBounds(SelectedWindow()->target_bounds()); | 511 selection_widget_->SetBounds(SelectedWindow()->target_bounds()); |
| 513 selection_widget_->SetOpacity(255); | 512 selection_widget_->SetOpacity(255); |
| 514 } | 513 } |
| 515 | 514 |
| 516 } // namespace ash | 515 } // namespace ash |
| OLD | NEW |