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

Side by Side Diff: chrome/browser/ui/views/ash/balloon_view_ash.cc

Issue 12945007: Fix Notifications Icon loading. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tiny fix Created 7 years, 9 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 #include "chrome/browser/ui/views/ash/balloon_view_ash.h" 5 #include "chrome/browser/ui/views/ash/balloon_view_ash.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/web_notification/web_notification_tray.h" 8 #include "ash/system/web_notification/web_notification_tray.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 return; 82 return;
83 } 83 }
84 84
85 content::WebContents* contents = 85 content::WebContents* contents =
86 content::WebContents::FromRenderViewHost(host); 86 content::WebContents::FromRenderViewHost(host);
87 if (!contents) { 87 if (!contents) {
88 LOG(WARNING) << "Notification needs an image but has no WebContents"; 88 LOG(WARNING) << "Notification needs an image but has no WebContents";
89 return; 89 return;
90 } 90 }
91 91
92 contents->DownloadFavicon(url_, size_, base::Bind(&ImageDownload::Downloaded, 92 contents->DownloadFavicon(url_,
93 AsWeakPtr())); 93 false, // not a favicon
jam 2013/03/20 02:44:42 ditto
94 size_,
95 base::Bind(&ImageDownload::Downloaded,AsWeakPtr()));
94 } 96 }
95 97
96 98
97 BalloonViewAsh::ImageDownload::~ImageDownload() { 99 BalloonViewAsh::ImageDownload::~ImageDownload() {
98 } 100 }
99 101
100 void BalloonViewAsh::ImageDownload::Downloaded( 102 void BalloonViewAsh::ImageDownload::Downloaded(
101 int download_id, 103 int download_id,
102 const GURL& image_url, 104 const GURL& image_url,
103 int requested_size, 105 int requested_size,
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 message_center::kNotificationButtonIconSize, 227 message_center::kNotificationButtonIconSize,
226 base::Bind(&BalloonViewAsh::SetNotificationButtonIcon, 228 base::Bind(&BalloonViewAsh::SetNotificationButtonIcon,
227 base::Unretained(this), 229 base::Unretained(this),
228 notification.notification_id(), 230 notification.notification_id(),
229 i)))); 231 i))));
230 } 232 }
231 } 233 }
232 } 234 }
233 } 235 }
234 } 236 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698