| 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 #ifndef CHROME_BROWSER_UI_VIEWS_ASH_BALLOON_VIEW_ASH_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_ASH_BALLOON_VIEW_ASH_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_ASH_BALLOON_VIEW_ASH_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_ASH_BALLOON_VIEW_ASH_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 // BalloonView interface. | 25 // BalloonView interface. |
| 26 virtual void Show(Balloon* balloon) OVERRIDE; | 26 virtual void Show(Balloon* balloon) OVERRIDE; |
| 27 virtual void Update() OVERRIDE; | 27 virtual void Update() OVERRIDE; |
| 28 virtual void RepositionToBalloon() OVERRIDE; | 28 virtual void RepositionToBalloon() OVERRIDE; |
| 29 virtual void Close(bool by_user) OVERRIDE; | 29 virtual void Close(bool by_user) OVERRIDE; |
| 30 virtual gfx::Size GetSize() const OVERRIDE; | 30 virtual gfx::Size GetSize() const OVERRIDE; |
| 31 virtual BalloonHost* GetHost() const OVERRIDE; | 31 virtual BalloonHost* GetHost() const OVERRIDE; |
| 32 | 32 |
| 33 void SetNotificationIcon(const std::string& id, const gfx::ImageSkia& image); | 33 void SetNotificationIcon(const std::string& id, const gfx::ImageSkia& image); |
| 34 void SetNotificationImage(const std::string& id, const gfx::ImageSkia& image); |
| 34 | 35 |
| 35 private: | 36 private: |
| 36 class ImageDownload; | 37 class ImageDownload; |
| 37 | 38 |
| 38 typedef std::map<GURL, linked_ptr<ImageDownload> > ImageDownloads; | 39 typedef std::map<GURL, linked_ptr<ImageDownload> > ImageDownloads; |
| 39 | 40 |
| 40 void DownloadImages(const Notification& notification); | 41 void DownloadImages(const Notification& notification); |
| 41 ImageDownload& GetImageDownload(const GURL& url); | 42 ImageDownload& GetImageDownload(const GURL& url); |
| 42 | 43 |
| 43 BalloonCollection* collection_; | 44 BalloonCollection* collection_; |
| 44 Balloon* balloon_; | 45 Balloon* balloon_; |
| 45 | 46 |
| 46 // Track the current notification id and downloads so the notification can be | 47 // Track the current notification id and downloads so the notification can be |
| 47 // updated properly. | 48 // updated properly. |
| 48 std::string notification_id_; | 49 std::string notification_id_; |
| 49 ImageDownloads downloads_; | 50 ImageDownloads downloads_; |
| 50 | 51 |
| 51 DISALLOW_COPY_AND_ASSIGN(BalloonViewAsh); | 52 DISALLOW_COPY_AND_ASSIGN(BalloonViewAsh); |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 #endif // CHROME_BROWSER_UI_VIEWS_ASH_BALLOON_VIEW_ASH_H_ | 55 #endif // CHROME_BROWSER_UI_VIEWS_ASH_BALLOON_VIEW_ASH_H_ |
| OLD | NEW |