OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_BALLOON_VIEW_WIN_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_BALLOON_VIEW_WIN_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/memory/linked_ptr.h" |
| 11 #include "chrome/browser/notifications/balloon.h" |
| 12 |
| 13 class GURL; |
| 14 |
| 15 namespace gfx { |
| 16 class ImageSkia; |
| 17 } |
| 18 |
| 19 class BalloonViewWin : public BalloonView { |
| 20 public: |
| 21 explicit BalloonViewWin(BalloonCollection* collection); |
| 22 virtual ~BalloonViewWin(); |
| 23 |
| 24 // BalloonView interface. |
| 25 virtual void Show(Balloon* balloon) OVERRIDE; |
| 26 virtual void Update() OVERRIDE; |
| 27 virtual void RepositionToBalloon() OVERRIDE; |
| 28 virtual void Close(bool by_user) OVERRIDE; |
| 29 virtual gfx::Size GetSize() const OVERRIDE; |
| 30 virtual BalloonHost* GetHost() const OVERRIDE; |
| 31 |
| 32 void SetNotificationIcon(const std::string& id, const gfx::ImageSkia& image); |
| 33 void SetNotificationImage(const std::string& id, const gfx::ImageSkia& image); |
| 34 |
| 35 private: |
| 36 class ImageDownload; |
| 37 |
| 38 typedef std::vector<linked_ptr<ImageDownload> > ImageDownloads; |
| 39 |
| 40 void DownloadImages(const Notification& notification); |
| 41 |
| 42 BalloonCollection* collection_; |
| 43 Balloon* balloon_; |
| 44 |
| 45 // Track the current notification id and downloads so the notification can be |
| 46 // updated properly. |
| 47 std::string notification_id_; |
| 48 ImageDownloads downloads_; |
| 49 |
| 50 DISALLOW_COPY_AND_ASSIGN(BalloonViewWin); |
| 51 }; |
| 52 |
| 53 #endif // CHROME_BROWSER_UI_VIEWS_BALLOON_VIEW_WIN_H_ |
OLD | NEW |