Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: chrome/browser/ui/cocoa/download/download_started_animation_mac.mm

Issue 12279015: Mac Chromium style checker cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 registrar_.Add(this, 58 registrar_.Add(this,
59 content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED, 59 content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED,
60 content::Source<WebContents>(web_contents_)); 60 content::Source<WebContents>(web_contents_));
61 registrar_.Add(this, 61 registrar_.Add(this,
62 content::NOTIFICATION_WEB_CONTENTS_DESTROYED, 62 content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
63 content::Source<WebContents>(web_contents_)); 63 content::Source<WebContents>(web_contents_));
64 } 64 }
65 65
66 // Runs when a tab is hidden or destroyed. Let our owner know we should end 66 // Runs when a tab is hidden or destroyed. Let our owner know we should end
67 // the animation. 67 // the animation.
68 void Observe(int type, 68 virtual void Observe(
69 const content::NotificationSource& source, 69 int type,
70 const content::NotificationDetails& details) { 70 const content::NotificationSource& source,
71 const content::NotificationDetails& details) OVERRIDE {
71 if (type == content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED) { 72 if (type == content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED) {
72 bool visible = *content::Details<bool>(details).ptr(); 73 bool visible = *content::Details<bool>(details).ptr();
73 if (visible) 74 if (visible)
74 return; 75 return;
75 } 76 }
76 // This ends up deleting us. 77 // This ends up deleting us.
77 [owner_ closeAnimation]; 78 [owner_ closeAnimation];
78 } 79 }
79 80
80 private: 81 private:
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 200 }
200 201
201 @end 202 @end
202 203
203 void DownloadStartedAnimation::Show(WebContents* web_contents) { 204 void DownloadStartedAnimation::Show(WebContents* web_contents) {
204 DCHECK(web_contents); 205 DCHECK(web_contents);
205 206
206 // Will be deleted when the animation is complete. 207 // Will be deleted when the animation is complete.
207 [DownloadStartedAnimationMac startAnimationWithWebContents:web_contents]; 208 [DownloadStartedAnimationMac startAnimationWithWebContents:web_contents];
208 } 209 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698