| 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 "content/public/browser/web_contents.h" | 7 #include "content/public/browser/web_contents.h" |
| 8 #include "grit/theme_resources.h" | 8 #include "grit/theme_resources.h" |
| 9 #include "ui/base/resource/resource_bundle.h" | 9 #include "ui/base/resource/resource_bundle.h" |
| 10 #include "ui/gfx/animation/linear_animation.h" | 10 #include "ui/gfx/animation/linear_animation.h" |
| 11 #include "ui/gfx/rect.h" | 11 #include "ui/gfx/geometry/rect.h" |
| 12 #include "ui/views/controls/image_view.h" | 12 #include "ui/views/controls/image_view.h" |
| 13 #include "ui/views/widget/widget.h" | 13 #include "ui/views/widget/widget.h" |
| 14 | 14 |
| 15 // How long to spend moving downwards and fading out after waiting. | 15 // How long to spend moving downwards and fading out after waiting. |
| 16 const int kMoveTimeMs = 600; | 16 const int kMoveTimeMs = 600; |
| 17 | 17 |
| 18 // The animation framerate. | 18 // The animation framerate. |
| 19 const int kFrameRateHz = 60; | 19 const int kFrameRateHz = 60; |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 } | 119 } |
| 120 } | 120 } |
| 121 | 121 |
| 122 } // namespace | 122 } // namespace |
| 123 | 123 |
| 124 // static | 124 // static |
| 125 void DownloadStartedAnimation::Show(content::WebContents* web_contents) { | 125 void DownloadStartedAnimation::Show(content::WebContents* web_contents) { |
| 126 // The animation will delete itself when it's finished. | 126 // The animation will delete itself when it's finished. |
| 127 new DownloadStartedAnimationViews(web_contents); | 127 new DownloadStartedAnimationViews(web_contents); |
| 128 } | 128 } |
| OLD | NEW |