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 // 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 "base/logging.h" | 14 #include "base/logging.h" |
15 #import "chrome/browser/ui/cocoa/animatable_image.h" | 15 #import "chrome/browser/ui/cocoa/animatable_image.h" |
16 #include "content/public/browser/notification_details.h" | 16 #include "content/public/browser/notification_details.h" |
17 #include "content/public/browser/notification_observer.h" | 17 #include "content/public/browser/notification_observer.h" |
18 #include "content/public/browser/notification_registrar.h" | 18 #include "content/public/browser/notification_registrar.h" |
19 #include "content/public/browser/notification_source.h" | 19 #include "content/public/browser/notification_source.h" |
20 #include "content/public/browser/notification_types.h" | 20 #include "content/public/browser/notification_types.h" |
21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
22 #include "grit/theme_resources.h" | 22 #include "grit/theme_resources_standard.h" |
23 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" | 23 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" |
24 #include "third_party/skia/include/utils/mac/SkCGUtils.h" | 24 #include "third_party/skia/include/utils/mac/SkCGUtils.h" |
25 #include "ui/base/resource/resource_bundle.h" | 25 #include "ui/base/resource/resource_bundle.h" |
26 #include "ui/gfx/image/image.h" | 26 #include "ui/gfx/image/image.h" |
27 #include "ui/gfx/rect.h" | 27 #include "ui/gfx/rect.h" |
28 | 28 |
29 class DownloadAnimationWebObserver; | 29 class DownloadAnimationWebObserver; |
30 | 30 |
31 using content::WebContents; | 31 using content::WebContents; |
32 | 32 |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 } | 198 } |
199 | 199 |
200 @end | 200 @end |
201 | 201 |
202 void DownloadStartedAnimation::Show(WebContents* web_contents) { | 202 void DownloadStartedAnimation::Show(WebContents* web_contents) { |
203 DCHECK(web_contents); | 203 DCHECK(web_contents); |
204 | 204 |
205 // Will be deleted when the animation is complete. | 205 // Will be deleted when the animation is complete. |
206 [DownloadStartedAnimationMac startAnimationWithWebContents:web_contents]; | 206 [DownloadStartedAnimationMac startAnimationWithWebContents:web_contents]; |
207 } | 207 } |
OLD | NEW |