| Index: chrome/browser/notifications/message_center_notification_manager.h
|
| diff --git a/chrome/browser/notifications/message_center_notification_manager.h b/chrome/browser/notifications/message_center_notification_manager.h
|
| index 918fb11c7222df4a3da4ec530b054eb0526e9667..31492d65d07cec12f51cfb53c6e2f74e434d999f 100644
|
| --- a/chrome/browser/notifications/message_center_notification_manager.h
|
| +++ b/chrome/browser/notifications/message_center_notification_manager.h
|
| @@ -100,55 +100,6 @@ class MessageCenterNotificationManager
|
| private:
|
| FRIEND_TEST_ALL_PREFIXES(message_center::WebNotificationTrayTest,
|
| ManuallyCloseMessageCenter);
|
| - class ImageDownloadsObserver {
|
| - public:
|
| - virtual void OnDownloadsCompleted() = 0;
|
| - };
|
| -
|
| - typedef base::Callback<void(const gfx::Image&)> SetImageCallback;
|
| - class ImageDownloads
|
| - : public base::SupportsWeakPtr<ImageDownloads> {
|
| - public:
|
| - ImageDownloads(
|
| - message_center::MessageCenter* message_center,
|
| - ImageDownloadsObserver* observer);
|
| - virtual ~ImageDownloads();
|
| -
|
| - void StartDownloads(const Notification& notification);
|
| - void StartDownloadWithImage(const Notification& notification,
|
| - const gfx::Image* image,
|
| - const GURL& url,
|
| - const SetImageCallback& callback);
|
| - void StartDownloadByKey(const Notification& notification,
|
| - const char* key,
|
| - int size,
|
| - const SetImageCallback& callback);
|
| -
|
| - // FaviconHelper callback.
|
| - void DownloadComplete(const SetImageCallback& callback,
|
| - int download_id,
|
| - int http_status_code,
|
| - const GURL& image_url,
|
| - const std::vector<SkBitmap>& bitmaps,
|
| - const std::vector<gfx::Size>& original_bitmap_sizes);
|
| - private:
|
| - // Used to keep track of the number of pending downloads. Once this
|
| - // reaches zero, we can tell the delegate that we don't need the
|
| - // RenderViewHost anymore.
|
| - void AddPendingDownload();
|
| - void PendingDownloadCompleted();
|
| -
|
| - // Weak reference to global message center.
|
| - message_center::MessageCenter* message_center_;
|
| -
|
| - // Count of downloads that remain.
|
| - size_t pending_downloads_;
|
| -
|
| - // Weak.
|
| - ImageDownloadsObserver* observer_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(ImageDownloads);
|
| - };
|
|
|
| // This class keeps a set of original Notification objects and corresponding
|
| // Profiles, so when MessageCenter calls back with a notification_id, this
|
| @@ -162,18 +113,13 @@ class MessageCenterNotificationManager
|
| // TODO(dimich): Consider merging all 4 types (Notification,
|
| // QueuedNotification, ProfileNotification and NotificationList::Notification)
|
| // into a single class.
|
| - class ProfileNotification : public ImageDownloadsObserver {
|
| + class ProfileNotification {
|
| public:
|
| ProfileNotification(Profile* profile,
|
| const Notification& notification,
|
| message_center::MessageCenter* message_center);
|
| virtual ~ProfileNotification();
|
|
|
| - void StartDownloads();
|
| -
|
| - // Overridden from ImageDownloadsObserver.
|
| - virtual void OnDownloadsCompleted() OVERRIDE;
|
| -
|
| Profile* profile() const { return profile_; }
|
| const Notification& notification() const { return notification_; }
|
|
|
| @@ -184,9 +130,6 @@ class MessageCenterNotificationManager
|
| // Weak, guaranteed not to be used after profile removal by parent class.
|
| Profile* profile_;
|
| Notification notification_;
|
| - // Track the downloads for this notification so the notification can be
|
| - // updated properly.
|
| - scoped_ptr<ImageDownloads> downloads_;
|
| };
|
|
|
| scoped_ptr<message_center::MessageCenterTrayDelegate> tray_;
|
|
|