Index: chrome/browser/ui/views/balloon_view_win.h |
diff --git a/chrome/browser/ui/views/balloon_view_win.h b/chrome/browser/ui/views/balloon_view_win.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..565aeb7e1adccb0457f13b86368183f6d8a16aad |
--- /dev/null |
+++ b/chrome/browser/ui/views/balloon_view_win.h |
@@ -0,0 +1,53 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_VIEWS_BALLOON_VIEW_WIN_H_ |
+#define CHROME_BROWSER_UI_VIEWS_BALLOON_VIEW_WIN_H_ |
+ |
+#include <vector> |
+ |
+#include "base/memory/linked_ptr.h" |
+#include "chrome/browser/notifications/balloon.h" |
+ |
+class GURL; |
+ |
+namespace gfx { |
+class ImageSkia; |
+} |
+ |
+class BalloonViewWin : public BalloonView { |
+ public: |
+ explicit BalloonViewWin(BalloonCollection* collection); |
+ virtual ~BalloonViewWin(); |
+ |
+ // BalloonView interface. |
+ virtual void Show(Balloon* balloon) OVERRIDE; |
+ virtual void Update() OVERRIDE; |
+ virtual void RepositionToBalloon() OVERRIDE; |
+ virtual void Close(bool by_user) OVERRIDE; |
+ virtual gfx::Size GetSize() const OVERRIDE; |
+ virtual BalloonHost* GetHost() const OVERRIDE; |
+ |
+ void SetNotificationIcon(const std::string& id, const gfx::ImageSkia& image); |
+ void SetNotificationImage(const std::string& id, const gfx::ImageSkia& image); |
+ |
+ private: |
+ class ImageDownload; |
+ |
+ typedef std::vector<linked_ptr<ImageDownload> > ImageDownloads; |
+ |
+ void DownloadImages(const Notification& notification); |
+ |
+ BalloonCollection* collection_; |
+ Balloon* balloon_; |
+ |
+ // Track the current notification id and downloads so the notification can be |
+ // updated properly. |
+ std::string notification_id_; |
+ ImageDownloads downloads_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(BalloonViewWin); |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_VIEWS_BALLOON_VIEW_WIN_H_ |