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

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

Issue 11819048: Implement message center on Windows (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Now with more tests, and corrected copyright notices. 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
(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_COLLECTION_IMPL_WIN_H_
6 #define CHROME_BROWSER_UI_VIEWS_BALLOON_COLLECTION_IMPL_WIN_H_
7
8 #include <set>
sky 2013/01/18 21:30:56 You don't use set in this file.
dewittj 2013/01/20 19:02:06 File gone.
9
10 #include "chrome/browser/notifications/balloon_collection_impl.h"
11 #include "ui/message_center/message_center.h"
12
13 namespace extensions {
14 class Extension;
15 }
16
17 // Wrapper on top of ::BalloonCollectionImpl to provide integration between
18 // the Chrome notification UI and Windows notifications
19 // (ui::WebNotificationTrayWin).
20 class BalloonCollectionImplWin
21 : public BalloonCollectionImpl,
22 public message_center::MessageCenter::Delegate {
23 public:
24 BalloonCollectionImplWin();
25 virtual ~BalloonCollectionImplWin();
26
27 // Overridden from BalloonCollectionImpl.
28 virtual void Add(const Notification& notification,
29 Profile* profile) OVERRIDE;
30 virtual bool HasSpace() const OVERRIDE;
31
32 // Overridden from MessageCenter::Delegate.
33 virtual void NotificationRemoved(const std::string& notification_id) OVERRIDE;
34 virtual void DisableExtension(const std::string& notification_id) OVERRIDE;
35 virtual void DisableNotificationsFromSource(
36 const std::string& notification_id) OVERRIDE;
37 virtual void ShowSettings(const std::string& notification_id) OVERRIDE;
38 virtual void OnClicked(const std::string& notification_id) OVERRIDE;
39 virtual void OnButtonClicked(const std::string& notification_id,
40 int button_index) OVERRIDE;
41
Pete Williamson 2013/01/23 19:52:16 I see that balloon_collection_impl_ash.h has a fun
dewittj 2013/01/23 22:07:51 File gone.
42 // Updates the notification's content. It uses
43 // NotificationDelegate::id() to check the equality of notifications.
44 // Returns true if the notification has been updated. False if
45 // no corresponding notification is found. This will not change the
46 // visibility of the notification.
47 bool UpdateNotification(const Notification& notification);
48
49 // On Win this behaves the same as UpdateNotification.
50 bool UpdateAndShowNotification(const Notification& notification);
51
52 protected:
53 // Creates a new balloon. Overridable by unit tests. The caller is
54 // responsible for freeing the pointer returned.
55 virtual Balloon* MakeBalloon(const Notification& notification,
56 Profile* profile) OVERRIDE;
57
58 const extensions::Extension* GetBalloonExtension(Balloon* balloon);
59
60 private:
61 DISALLOW_COPY_AND_ASSIGN(BalloonCollectionImplWin);
62 };
63
64 #endif // CHROME_BROWSER_UI_VIEWS_BALLOON_COLLECTION_IMPL_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698