OLD | NEW |
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 Loading... |
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_ |
OLD | NEW |