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

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

Issue 12780024: Split FaviconHelper in two: ImageLoadingHelper and FaviconHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: caitp feedback 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_, 92 contents->DownloadImage(url_,
93 false, 93 false,
94 size_, 94 size_,
95 base::Bind(&ImageDownload::Downloaded,AsWeakPtr())); 95 base::Bind(&ImageDownload::Downloaded,AsWeakPtr()));
96 } 96 }
97 97
98 98
99 BalloonViewAsh::ImageDownload::~ImageDownload() { 99 BalloonViewAsh::ImageDownload::~ImageDownload() {
100 } 100 }
101 101
102 void BalloonViewAsh::ImageDownload::Downloaded( 102 void BalloonViewAsh::ImageDownload::Downloaded(
103 int download_id, 103 int download_id,
104 const GURL& image_url, 104 const GURL& image_url,
105 int requested_size, 105 int requested_size,
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 message_center::kNotificationButtonIconSize, 227 message_center::kNotificationButtonIconSize,
228 base::Bind(&BalloonViewAsh::SetNotificationButtonIcon, 228 base::Bind(&BalloonViewAsh::SetNotificationButtonIcon,
229 base::Unretained(this), 229 base::Unretained(this),
230 notification.notification_id(), 230 notification.notification_id(),
231 i)))); 231 i))));
232 } 232 }
233 } 233 }
234 } 234 }
235 } 235 }
236 } 236 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/metro_pin_tab_helper_win.cc ('k') | chrome/browser/ui/views/create_application_shortcut_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698