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

Side by Side Diff: chrome/browser/ui/views/ash/balloon_view_ash.h

Issue 12747010: Remove BalloonCollectionImplAsh. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_VIEWS_ASH_BALLOON_VIEW_ASH_H_
6 #define CHROME_BROWSER_UI_VIEWS_ASH_BALLOON_VIEW_ASH_H_
7
8 #include <vector>
9
10 #include "base/memory/linked_ptr.h"
11 #include "chrome/browser/notifications/balloon.h"
12
13 namespace gfx {
14 class Image;
15 }
16
17 // On Ash, a "BalloonView" is just a wrapper for ash notification entries.
18 class BalloonViewAsh : public BalloonView {
19 public:
20 explicit BalloonViewAsh(BalloonCollection* collection);
21 virtual ~BalloonViewAsh();
22
23 // BalloonView interface.
24 virtual void Show(Balloon* balloon) OVERRIDE;
25 virtual void Update() OVERRIDE;
26 virtual void RepositionToBalloon() OVERRIDE;
27 virtual void Close(bool by_user) OVERRIDE;
28 virtual gfx::Size GetSize() const OVERRIDE;
29 virtual BalloonHost* GetHost() const OVERRIDE;
30
31 void SetNotificationIcon(const std::string& notification_id,
32 const gfx::Image& image);
33 void SetNotificationImage(const std::string& notification_id,
34 const gfx::Image& image);
35 void SetNotificationButtonIcon(const std::string& notification_id,
36 int button_index,
37 const gfx::Image& image);
38
39 private:
40 class ImageDownload;
41
42 typedef std::vector<linked_ptr<ImageDownload> > ImageDownloads;
43
44 void DownloadImages(const Notification& notification);
45
46 BalloonCollection* collection_;
47 Balloon* balloon_;
48
49 // Track the current notification id and downloads so the notification can be
50 // updated properly.
51 std::string notification_id_;
52 ImageDownloads downloads_;
53
54 DISALLOW_COPY_AND_ASSIGN(BalloonViewAsh);
55 };
56
57 #endif // CHROME_BROWSER_UI_VIEWS_ASH_BALLOON_VIEW_ASH_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/balloon_collection_impl_ash.cc ('k') | chrome/browser/ui/views/ash/balloon_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698