| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include "app/animation.h" | 9 #include "app/animation.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 const int kFrameRateHz = 60; | 24 const int kFrameRateHz = 60; |
| 25 | 25 |
| 26 // What fraction of the frame height to move downward from the frame center. | 26 // What fraction of the frame height to move downward from the frame center. |
| 27 // Note that setting this greater than 0.5 will mean moving past the bottom of | 27 // Note that setting this greater than 0.5 will mean moving past the bottom of |
| 28 // the frame. | 28 // the frame. |
| 29 const double kMoveFraction = 1.0 / 3.0; | 29 const double kMoveFraction = 1.0 / 3.0; |
| 30 | 30 |
| 31 class DownloadStartedAnimationGtk : public Animation, | 31 class DownloadStartedAnimationGtk : public Animation, |
| 32 public NotificationObserver { | 32 public NotificationObserver { |
| 33 public: | 33 public: |
| 34 DownloadStartedAnimationGtk(TabContents* tab_contents); | 34 explicit DownloadStartedAnimationGtk(TabContents* tab_contents); |
| 35 | 35 |
| 36 // DownloadStartedAnimation will delete itself, but this is public so | 36 // DownloadStartedAnimation will delete itself, but this is public so |
| 37 // that we can use DeleteSoon(). | 37 // that we can use DeleteSoon(). |
| 38 virtual ~DownloadStartedAnimationGtk(); | 38 virtual ~DownloadStartedAnimationGtk(); |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 // Move the arrow to wherever it should currently be. | 41 // Move the arrow to wherever it should currently be. |
| 42 void Reposition(); | 42 void Reposition(); |
| 43 | 43 |
| 44 // Shut down cleanly. | 44 // Shut down cleanly. |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 Close(); | 185 Close(); |
| 186 } | 186 } |
| 187 | 187 |
| 188 } // namespace | 188 } // namespace |
| 189 | 189 |
| 190 // static | 190 // static |
| 191 void DownloadStartedAnimation::Show(TabContents* tab_contents) { | 191 void DownloadStartedAnimation::Show(TabContents* tab_contents) { |
| 192 // The animation will delete itself. | 192 // The animation will delete itself. |
| 193 new DownloadStartedAnimationGtk(tab_contents); | 193 new DownloadStartedAnimationGtk(tab_contents); |
| 194 } | 194 } |
| OLD | NEW |