| 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 // This file contains the Mac implementation the download animation, displayed | 5 // This file contains the Mac implementation the download animation, displayed |
| 6 // at the start of a download. The animation produces an arrow pointing | 6 // at the start of a download. The animation produces an arrow pointing |
| 7 // downwards and animates towards the bottom of the window where the new | 7 // downwards and animates towards the bottom of the window where the new |
| 8 // download appears in the download shelf. | 8 // download appears in the download shelf. |
| 9 | 9 |
| 10 #include "chrome/browser/download/download_started_animation.h" | 10 #include "chrome/browser/download/download_started_animation.h" |
| 11 | 11 |
| 12 #import <QuartzCore/QuartzCore.h> | 12 #import <QuartzCore/QuartzCore.h> |
| 13 | 13 |
| 14 #include "app/resource_bundle.h" | 14 #include "app/resource_bundle.h" |
| 15 #include "base/scoped_cftyperef.h" | |
| 16 #include "chrome/browser/tab_contents/tab_contents.h" | 15 #include "chrome/browser/tab_contents/tab_contents.h" |
| 17 #include "chrome/browser/tab_contents/tab_contents_view_mac.h" | 16 #include "chrome/browser/tab_contents/tab_contents_view_mac.h" |
| 18 #import "chrome/browser/cocoa/animatable_image.h" | 17 #import "chrome/browser/cocoa/animatable_image.h" |
| 19 #include "chrome/common/notification_registrar.h" | 18 #include "chrome/common/notification_registrar.h" |
| 20 #include "chrome/common/notification_service.h" | 19 #include "chrome/common/notification_service.h" |
| 21 #include "grit/theme_resources.h" | 20 #include "grit/theme_resources.h" |
| 22 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" | 21 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" |
| 23 #include "third_party/skia/include/utils/mac/SkCGUtils.h" | 22 #include "third_party/skia/include/utils/mac/SkCGUtils.h" |
| 24 | 23 |
| 25 class DownloadAnimationTabObserver; | 24 class DownloadAnimationTabObserver; |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 } | 186 } |
| 188 | 187 |
| 189 @end | 188 @end |
| 190 | 189 |
| 191 void DownloadStartedAnimation::Show(TabContents* tab_contents) { | 190 void DownloadStartedAnimation::Show(TabContents* tab_contents) { |
| 192 DCHECK(tab_contents); | 191 DCHECK(tab_contents); |
| 193 | 192 |
| 194 // Will be deleted when the animation is complete. | 193 // Will be deleted when the animation is complete. |
| 195 [DownloadStartedAnimationMac startAnimationWithTabContents:tab_contents]; | 194 [DownloadStartedAnimationMac startAnimationWithTabContents:tab_contents]; |
| 196 } | 195 } |
| OLD | NEW |