Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: chrome/browser/ui/views/balloon_view_win.h

Issue 11819048: Implement message center on Windows (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase on master @fa1d2262 and rearrange dependencies. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_BALLOON_VIEW_WIN_H_
6 #define CHROME_BROWSER_UI_VIEWS_ASH_BALLOON_VIEW_ASH_H_ 6 #define CHROME_BROWSER_UI_VIEWS_BALLOON_VIEW_WIN_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
11 #include "chrome/browser/notifications/balloon.h" 11 #include "chrome/browser/notifications/balloon.h"
12 12
13 class GURL; 13 class GURL;
14 14
15 namespace gfx { 15 namespace gfx {
16 class ImageSkia; 16 class ImageSkia;
17 } 17 }
18 18
19 // On Ash, a "BalloonView" is just a wrapper for ash notification entries. 19 class BalloonViewWin : public BalloonView {
20 class BalloonViewAsh : public BalloonView {
21 public: 20 public:
22 explicit BalloonViewAsh(BalloonCollection* collection); 21 explicit BalloonViewWin(BalloonCollection* collection);
23 virtual ~BalloonViewAsh(); 22 virtual ~BalloonViewWin();
24 23
25 // BalloonView interface. 24 // BalloonView interface.
26 virtual void Show(Balloon* balloon) OVERRIDE; 25 virtual void Show(Balloon* balloon) OVERRIDE;
27 virtual void Update() OVERRIDE; 26 virtual void Update() OVERRIDE;
28 virtual void RepositionToBalloon() OVERRIDE; 27 virtual void RepositionToBalloon() OVERRIDE;
29 virtual void Close(bool by_user) OVERRIDE; 28 virtual void Close(bool by_user) OVERRIDE;
30 virtual gfx::Size GetSize() const OVERRIDE; 29 virtual gfx::Size GetSize() const OVERRIDE;
31 virtual BalloonHost* GetHost() const OVERRIDE; 30 virtual BalloonHost* GetHost() const OVERRIDE;
32 31
33 void SetNotificationIcon(const std::string& id, const gfx::ImageSkia& image); 32 void SetNotificationIcon(const std::string& id, const gfx::ImageSkia& image);
34 void SetNotificationImage(const std::string& id, const gfx::ImageSkia& image); 33 void SetNotificationImage(const std::string& id, const gfx::ImageSkia& image);
35 34
36 private: 35 private:
37 class ImageDownload; 36 class ImageDownload;
38 37
39 typedef std::vector<linked_ptr<ImageDownload> > ImageDownloads; 38 typedef std::vector<linked_ptr<ImageDownload> > ImageDownloads;
40 39
41 void DownloadImages(const Notification& notification); 40 void DownloadImages(const Notification& notification);
42 41
43 BalloonCollection* collection_; 42 BalloonCollection* collection_;
44 Balloon* balloon_; 43 Balloon* balloon_;
45 44
46 // Track the current notification id and downloads so the notification can be 45 // Track the current notification id and downloads so the notification can be
47 // updated properly. 46 // updated properly.
48 std::string notification_id_; 47 std::string notification_id_;
49 ImageDownloads downloads_; 48 ImageDownloads downloads_;
50 49
51 DISALLOW_COPY_AND_ASSIGN(BalloonViewAsh); 50 DISALLOW_COPY_AND_ASSIGN(BalloonViewWin);
52 }; 51 };
53 52
54 #endif // CHROME_BROWSER_UI_VIEWS_ASH_BALLOON_VIEW_ASH_H_ 53 #endif // CHROME_BROWSER_UI_VIEWS_BALLOON_VIEW_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698