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

Side by Side Diff: ui/app_list/views/top_icon_animation_view.cc

Issue 2422873002: Remove usage of FOR_EACH_OBSERVER macro in ui/app_list (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « ui/app_list/views/app_list_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/app_list/views/top_icon_animation_view.h" 5 #include "ui/app_list/views/top_icon_animation_view.h"
6 6
7 #include "base/threading/thread_task_runner_handle.h" 7 #include "base/threading/thread_task_runner_handle.h"
8 #include "ui/app_list/app_list_constants.h" 8 #include "ui/app_list/app_list_constants.h"
9 #include "ui/compositor/scoped_layer_animation_settings.h" 9 #include "ui/compositor/scoped_layer_animation_settings.h"
10 #include "ui/gfx/image/image_skia_operations.h" 10 #include "ui/gfx/image/image_skia_operations.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 gfx::Size TopIconAnimationView::GetPreferredSize() const { 75 gfx::Size TopIconAnimationView::GetPreferredSize() const {
76 return icon_size_; 76 return icon_size_;
77 } 77 }
78 78
79 void TopIconAnimationView::Layout() { 79 void TopIconAnimationView::Layout() {
80 icon_->SetBoundsRect(GetContentsBounds()); 80 icon_->SetBoundsRect(GetContentsBounds());
81 } 81 }
82 82
83 void TopIconAnimationView::OnImplicitAnimationsCompleted() { 83 void TopIconAnimationView::OnImplicitAnimationsCompleted() {
84 SetVisible(false); 84 SetVisible(false);
85 FOR_EACH_OBSERVER(TopIconAnimationObserver, 85 for (auto& observer : observers_)
86 observers_, 86 observer.OnTopIconAnimationsComplete();
87 OnTopIconAnimationsComplete());
88 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); 87 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
89 } 88 }
90 89
91 bool TopIconAnimationView::RequiresNotificationWhenAnimatorDestroyed() const { 90 bool TopIconAnimationView::RequiresNotificationWhenAnimatorDestroyed() const {
92 return true; 91 return true;
93 } 92 }
94 93
95 } // namespace app_list 94 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698