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 #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 Loading... |
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, |
| 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 Loading... |
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 } |
OLD | NEW |