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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 // Overridden from FakeMessageCenter. | 24 // Overridden from FakeMessageCenter. |
25 void AddObserver(MessageCenterObserver* observer) override; | 25 void AddObserver(MessageCenterObserver* observer) override; |
26 void RemoveObserver(MessageCenterObserver* observer) override; | 26 void RemoveObserver(MessageCenterObserver* observer) override; |
27 void AddNotificationBlocker(NotificationBlocker* blocker) override; | 27 void AddNotificationBlocker(NotificationBlocker* blocker) override; |
28 void RemoveNotificationBlocker(NotificationBlocker* blocker) override; | 28 void RemoveNotificationBlocker(NotificationBlocker* blocker) override; |
29 size_t NotificationCount() const override; | 29 size_t NotificationCount() const override; |
30 size_t UnreadNotificationCount() const override; | 30 size_t UnreadNotificationCount() const override; |
31 bool HasPopupNotifications() const override; | 31 bool HasPopupNotifications() const override; |
32 bool IsQuietMode() const override; | 32 bool IsQuietMode() const override; |
| 33 bool IsLockedState() const override; |
33 bool HasClickedListener(const std::string& id) override; | 34 bool HasClickedListener(const std::string& id) override; |
34 message_center::Notification* FindVisibleNotificationById( | 35 message_center::Notification* FindVisibleNotificationById( |
35 const std::string& id) override; | 36 const std::string& id) override; |
36 const NotificationList::Notifications& GetVisibleNotifications() override; | 37 const NotificationList::Notifications& GetVisibleNotifications() override; |
37 NotificationList::PopupNotifications GetPopupNotifications() override; | 38 NotificationList::PopupNotifications GetPopupNotifications() override; |
38 void AddNotification(std::unique_ptr<Notification> notification) override; | 39 void AddNotification(std::unique_ptr<Notification> notification) override; |
39 void UpdateNotification( | 40 void UpdateNotification( |
40 const std::string& old_id, | 41 const std::string& old_id, |
41 std::unique_ptr<Notification> new_notification) override; | 42 std::unique_ptr<Notification> new_notification) override; |
42 | 43 |
(...skipping 13 matching lines...) Expand all Loading... |
56 void ClickOnNotificationButton(const std::string& id, | 57 void ClickOnNotificationButton(const std::string& id, |
57 int button_index) override; | 58 int button_index) override; |
58 void ClickOnSettingsButton(const std::string& id) override; | 59 void ClickOnSettingsButton(const std::string& id) override; |
59 void MarkSinglePopupAsShown(const std::string& id, | 60 void MarkSinglePopupAsShown(const std::string& id, |
60 bool mark_notification_as_read) override; | 61 bool mark_notification_as_read) override; |
61 void DisplayedNotification(const std::string& id, | 62 void DisplayedNotification(const std::string& id, |
62 const DisplaySource source) override; | 63 const DisplaySource source) override; |
63 void SetNotifierSettingsProvider(NotifierSettingsProvider* provider) override; | 64 void SetNotifierSettingsProvider(NotifierSettingsProvider* provider) override; |
64 NotifierSettingsProvider* GetNotifierSettingsProvider() override; | 65 NotifierSettingsProvider* GetNotifierSettingsProvider() override; |
65 void SetQuietMode(bool in_quiet_mode) override; | 66 void SetQuietMode(bool in_quiet_mode) override; |
| 67 void SetLockedState(bool locked) override; |
66 void EnterQuietModeWithExpire(const base::TimeDelta& expires_in) override; | 68 void EnterQuietModeWithExpire(const base::TimeDelta& expires_in) override; |
67 void SetVisibility(Visibility visible) override; | 69 void SetVisibility(Visibility visible) override; |
68 bool IsMessageCenterVisible() const override; | 70 bool IsMessageCenterVisible() const override; |
69 void RestartPopupTimers() override; | 71 void RestartPopupTimers() override; |
70 void PausePopupTimers() override; | 72 void PausePopupTimers() override; |
71 | 73 |
72 protected: | 74 protected: |
73 void DisableTimersForTest() override; | 75 void DisableTimersForTest() override; |
74 void EnableChangeQueueForTest(bool enabled) override; | 76 void EnableChangeQueueForTest(bool enabled) override; |
75 | 77 |
76 private: | 78 private: |
77 const NotificationList::Notifications empty_notifications_; | 79 const NotificationList::Notifications empty_notifications_; |
78 | 80 |
79 DISALLOW_COPY_AND_ASSIGN(FakeMessageCenter); | 81 DISALLOW_COPY_AND_ASSIGN(FakeMessageCenter); |
80 }; | 82 }; |
81 | 83 |
82 } // namespace message_center | 84 } // namespace message_center |
83 | 85 |
84 #endif // UI_MESSAGE_CENTER_FAKE_MESSAGE_CENTER_H_ | 86 #endif // UI_MESSAGE_CENTER_FAKE_MESSAGE_CENTER_H_ |
OLD | NEW |