OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/macros.h" | 7 #include "base/macros.h" |
8 #include "chrome/app/vector_icons/vector_icons.h" | 8 #include "chrome/app/vector_icons/vector_icons.h" |
9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
11 #include "ui/gfx/animation/linear_animation.h" | 11 #include "ui/gfx/animation/linear_animation.h" |
12 #include "ui/gfx/color_palette.h" | 12 #include "ui/gfx/color_palette.h" |
13 #include "ui/gfx/geometry/rect.h" | 13 #include "ui/gfx/geometry/rect.h" |
14 #include "ui/gfx/paint_vector_icon.h" | 14 #include "ui/gfx/paint_vector_icon.h" |
15 #include "ui/gfx/vector_icons_public.h" | |
16 #include "ui/views/controls/image_view.h" | 15 #include "ui/views/controls/image_view.h" |
17 #include "ui/views/widget/widget.h" | 16 #include "ui/views/widget/widget.h" |
18 | 17 |
19 // How long to spend moving downwards and fading out after waiting. | 18 // How long to spend moving downwards and fading out after waiting. |
20 const int kMoveTimeMs = 600; | 19 const int kMoveTimeMs = 600; |
21 | 20 |
22 // The animation framerate. | 21 // The animation framerate. |
23 const int kFrameRateHz = 60; | 22 const int kFrameRateHz = 60; |
24 | 23 |
25 namespace { | 24 namespace { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 } | 117 } |
119 } | 118 } |
120 | 119 |
121 } // namespace | 120 } // namespace |
122 | 121 |
123 // static | 122 // static |
124 void DownloadStartedAnimation::Show(content::WebContents* web_contents) { | 123 void DownloadStartedAnimation::Show(content::WebContents* web_contents) { |
125 // The animation will delete itself when it's finished. | 124 // The animation will delete itself when it's finished. |
126 new DownloadStartedAnimationViews(web_contents); | 125 new DownloadStartedAnimationViews(web_contents); |
127 } | 126 } |
OLD | NEW |