| 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" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 explicit DownloadStartedAnimationViews(content::WebContents* web_contents); | 31 explicit DownloadStartedAnimationViews(content::WebContents* web_contents); |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 // Move the animation to wherever it should currently be. | 34 // Move the animation to wherever it should currently be. |
| 35 void Reposition(); | 35 void Reposition(); |
| 36 | 36 |
| 37 // Shut down the animation cleanly. | 37 // Shut down the animation cleanly. |
| 38 void Close(); | 38 void Close(); |
| 39 | 39 |
| 40 // Animation | 40 // Animation |
| 41 virtual void AnimateToState(double state) OVERRIDE; | 41 virtual void AnimateToState(double state) override; |
| 42 | 42 |
| 43 // We use a TYPE_POPUP for the popup so that it may float above any windows in | 43 // We use a TYPE_POPUP for the popup so that it may float above any windows in |
| 44 // our UI. | 44 // our UI. |
| 45 views::Widget* popup_; | 45 views::Widget* popup_; |
| 46 | 46 |
| 47 // The content area at the start of the animation. We store this so that the | 47 // The content area at the start of the animation. We store this so that the |
| 48 // download shelf's resizing of the content area doesn't cause the animation | 48 // download shelf's resizing of the content area doesn't cause the animation |
| 49 // to move around. This means that once started, the animation won't move | 49 // to move around. This means that once started, the animation won't move |
| 50 // with the parent window, but it's so fast that this shouldn't cause too | 50 // with the parent window, but it's so fast that this shouldn't cause too |
| 51 // much heartbreak. | 51 // much heartbreak. |
| (...skipping 67 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 |