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 "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/message_loop/message_loop_proxy.h" | 7 #include "base/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" |
11 #include "ui/views/controls/image_view.h" | 11 #include "ui/views/controls/image_view.h" |
12 | 12 |
13 namespace app_list { | 13 namespace app_list { |
14 | 14 |
15 TopIconAnimationView::TopIconAnimationView(const gfx::ImageSkia& icon, | 15 TopIconAnimationView::TopIconAnimationView(const gfx::ImageSkia& icon, |
16 const gfx::Rect& scaled_rect, | 16 const gfx::Rect& scaled_rect, |
17 bool open_folder) | 17 bool open_folder) |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
77 | 77 |
78 void TopIconAnimationView::Layout() { | 78 void TopIconAnimationView::Layout() { |
79 icon_->SetBoundsRect(GetContentsBounds()); | 79 icon_->SetBoundsRect(GetContentsBounds()); |
80 } | 80 } |
81 | 81 |
82 void TopIconAnimationView::OnImplicitAnimationsCompleted() { | 82 void TopIconAnimationView::OnImplicitAnimationsCompleted() { |
83 SetVisible(false); | 83 SetVisible(false); |
84 FOR_EACH_OBSERVER(TopIconAnimationObserver, | 84 FOR_EACH_OBSERVER(TopIconAnimationObserver, |
85 observers_, | 85 observers_, |
86 OnTopIconAnimationsComplete()); | 86 OnTopIconAnimationsComplete()); |
87 base::MessageLoopProxy::current()->DeleteSoon(FROM_HERE, this); | 87 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); |
sky
2014/09/02 15:34:14
This can be MessageLoop::current().
| |
88 } | 88 } |
89 | 89 |
90 bool TopIconAnimationView::RequiresNotificationWhenAnimatorDestroyed() const { | 90 bool TopIconAnimationView::RequiresNotificationWhenAnimatorDestroyed() const { |
91 return true; | 91 return true; |
92 } | 92 } |
93 | 93 |
94 } // namespace app_list | 94 } // namespace app_list |
OLD | NEW |