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

Side by Side Diff: ui/message_center/fake_message_center.h

Issue 324583002: The 1st patch to disambiguate message center notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 UI_MESSAGE_CENTER_FAKE_MESSAGE_CENTER_H_ 5 #ifndef UI_MESSAGE_CENTER_FAKE_MESSAGE_CENTER_H_
6 #define UI_MESSAGE_CENTER_FAKE_MESSAGE_CENTER_H_ 6 #define UI_MESSAGE_CENTER_FAKE_MESSAGE_CENTER_H_
7 7
8 #include "ui/message_center/message_center.h" 8 #include "ui/message_center/message_center.h"
9 #include "ui/message_center/message_center_types.h" 9 #include "ui/message_center/message_center_types.h"
10 10
11 namespace message_center { 11 namespace message_center {
12 12
13 class NotificationDelegate; 13 class NotificationDelegate;
14 14
15 // MessageCenter implementation of doing nothing. Useful for tests. 15 // MessageCenter implementation of doing nothing. Useful for tests.
16 class FakeMessageCenter : public MessageCenter { 16 class FakeMessageCenter : public MessageCenter {
17 public: 17 public:
18 FakeMessageCenter(); 18 FakeMessageCenter();
19 virtual ~FakeMessageCenter(); 19 virtual ~FakeMessageCenter();
20 20
21 // Overridden from FakeMessageCenter. 21 // Overridden from FakeMessageCenter.
22 virtual void AddObserver(MessageCenterObserver* observer) OVERRIDE; 22 virtual void AddObserver(MessageCenterObserver* observer) OVERRIDE;
23 virtual void RemoveObserver(MessageCenterObserver* observer) OVERRIDE; 23 virtual void RemoveObserver(MessageCenterObserver* observer) OVERRIDE;
24 virtual void AddNotificationBlocker(NotificationBlocker* blocker) OVERRIDE; 24 virtual void AddNotificationBlocker(NotificationBlocker* blocker) OVERRIDE;
25 virtual void RemoveNotificationBlocker(NotificationBlocker* blocker) OVERRIDE; 25 virtual void RemoveNotificationBlocker(NotificationBlocker* blocker) OVERRIDE;
26 virtual size_t NotificationCount() const OVERRIDE; 26 virtual size_t NotificationCount() const OVERRIDE;
27 virtual size_t UnreadNotificationCount() const OVERRIDE; 27 virtual size_t UnreadNotificationCount() const OVERRIDE;
28 virtual bool HasPopupNotifications() const OVERRIDE; 28 virtual bool HasPopupNotifications() const OVERRIDE;
29 virtual bool HasNotification(const std::string& id) OVERRIDE;
30 virtual bool IsQuietMode() const OVERRIDE; 29 virtual bool IsQuietMode() const OVERRIDE;
31 virtual bool HasClickedListener(const std::string& id) OVERRIDE; 30 virtual bool HasClickedListener(const std::string& id) OVERRIDE;
31 virtual message_center::Notification* FindVisibleNotificationById(
32 const std::string& id) OVERRIDE;
32 virtual const NotificationList::Notifications& GetVisibleNotifications() 33 virtual const NotificationList::Notifications& GetVisibleNotifications()
33 OVERRIDE; 34 OVERRIDE;
34 virtual NotificationList::PopupNotifications GetPopupNotifications() OVERRIDE; 35 virtual NotificationList::PopupNotifications GetPopupNotifications() OVERRIDE;
35 virtual void AddNotification(scoped_ptr<Notification> notification) OVERRIDE; 36 virtual void AddNotification(scoped_ptr<Notification> notification) OVERRIDE;
36 virtual void UpdateNotification(const std::string& old_id, 37 virtual void UpdateNotification(const std::string& old_id,
37 scoped_ptr<Notification> new_notification) 38 scoped_ptr<Notification> new_notification)
38 OVERRIDE; 39 OVERRIDE;
39 40
40 virtual void RemoveNotification(const std::string& id, bool by_user) OVERRIDE; 41 virtual void RemoveNotification(const std::string& id, bool by_user) OVERRIDE;
41 virtual void RemoveAllNotifications(bool by_user) OVERRIDE; 42 virtual void RemoveAllNotifications(bool by_user) OVERRIDE;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 76
76 private: 77 private:
77 const NotificationList::Notifications empty_notifications_; 78 const NotificationList::Notifications empty_notifications_;
78 79
79 DISALLOW_COPY_AND_ASSIGN(FakeMessageCenter); 80 DISALLOW_COPY_AND_ASSIGN(FakeMessageCenter);
80 }; 81 };
81 82
82 } // namespace message_center 83 } // namespace message_center
83 84
84 #endif // UI_MESSAGE_CENTER_FAKE_MESSAGE_CENTER_H_ 85 #endif // UI_MESSAGE_CENTER_FAKE_MESSAGE_CENTER_H_
OLDNEW
« no previous file with comments | « ui/message_center/cocoa/tray_view_controller.mm ('k') | ui/message_center/fake_message_center.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698