OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/download/download_started_animation.h" | 5 #include "chrome/browser/download/download_started_animation.h" |
6 | 6 |
7 #include "app/resource_bundle.h" | |
8 #include "chrome/browser/tab_contents/tab_contents.h" | 7 #include "chrome/browser/tab_contents/tab_contents.h" |
9 #include "chrome/common/notification_details.h" | 8 #include "chrome/common/notification_details.h" |
10 #include "chrome/common/notification_registrar.h" | 9 #include "chrome/common/notification_registrar.h" |
11 #include "chrome/common/notification_source.h" | 10 #include "chrome/common/notification_source.h" |
12 #include "gfx/rect.h" | 11 #include "gfx/rect.h" |
13 #include "grit/theme_resources.h" | 12 #include "grit/theme_resources.h" |
14 #include "ui/base/animation/linear_animation.h" | 13 #include "ui/base/animation/linear_animation.h" |
| 14 #include "ui/base/resource/resource_bundle.h" |
15 #include "views/controls/image_view.h" | 15 #include "views/controls/image_view.h" |
16 #include "views/widget/widget_win.h" | 16 #include "views/widget/widget_win.h" |
17 | 17 |
18 // How long to spend moving downwards and fading out after waiting. | 18 // How long to spend moving downwards and fading out after waiting. |
19 static const int kMoveTimeMs = 600; | 19 static const int kMoveTimeMs = 600; |
20 | 20 |
21 // The animation framerate. | 21 // The animation framerate. |
22 static const int kFrameRateHz = 60; | 22 static const int kFrameRateHz = 60; |
23 | 23 |
24 // What fraction of the frame height to move downward from the frame center. | 24 // What fraction of the frame height to move downward from the frame center. |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 } | 172 } |
173 | 173 |
174 } // namespace | 174 } // namespace |
175 | 175 |
176 // static | 176 // static |
177 void DownloadStartedAnimation::Show(TabContents* tab_contents) { | 177 void DownloadStartedAnimation::Show(TabContents* tab_contents) { |
178 // The animation will delete itself when it's finished or when the tab | 178 // The animation will delete itself when it's finished or when the tab |
179 // contents is hidden or destroyed. | 179 // contents is hidden or destroyed. |
180 new DownloadStartedAnimationWin(tab_contents); | 180 new DownloadStartedAnimationWin(tab_contents); |
181 } | 181 } |
OLD | NEW |