DevTools: kill codeschool extension from whitelist
[chromium-blink-merge.git] / ui / message_center / fake_message_center.h
blob604453caefda4a6f85bdc5817b6b930af9846b68
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
3 // found in the LICENSE file.
5 #ifndef UI_MESSAGE_CENTER_FAKE_MESSAGE_CENTER_H_
6 #define UI_MESSAGE_CENTER_FAKE_MESSAGE_CENTER_H_
8 #include "ui/message_center/message_center.h"
9 #include "ui/message_center/message_center_types.h"
11 namespace message_center {
13 class NotificationDelegate;
15 // MessageCenter implementation of doing nothing. Useful for tests.
16 class FakeMessageCenter : public MessageCenter {
17 public:
18 FakeMessageCenter();
19 ~FakeMessageCenter() override;
21 // Overridden from FakeMessageCenter.
22 void AddObserver(MessageCenterObserver* observer) override;
23 void RemoveObserver(MessageCenterObserver* observer) override;
24 void AddNotificationBlocker(NotificationBlocker* blocker) override;
25 void RemoveNotificationBlocker(NotificationBlocker* blocker) override;
26 size_t NotificationCount() const override;
27 size_t UnreadNotificationCount() const override;
28 bool HasPopupNotifications() const override;
29 bool IsQuietMode() const override;
30 bool HasClickedListener(const std::string& id) override;
31 message_center::Notification* FindVisibleNotificationById(
32 const std::string& id) override;
33 const NotificationList::Notifications& GetVisibleNotifications() override;
34 NotificationList::PopupNotifications GetPopupNotifications() override;
35 void AddNotification(scoped_ptr<Notification> notification) override;
36 void UpdateNotification(const std::string& old_id,
37 scoped_ptr<Notification> new_notification) override;
39 void RemoveNotification(const std::string& id, bool by_user) override;
40 void RemoveAllNotifications(bool by_user) override;
41 void RemoveAllVisibleNotifications(bool by_user) override;
42 void SetNotificationIcon(const std::string& notification_id,
43 const gfx::Image& image) override;
45 void SetNotificationImage(const std::string& notification_id,
46 const gfx::Image& image) override;
48 void SetNotificationButtonIcon(const std::string& notification_id,
49 int button_index,
50 const gfx::Image& image) override;
51 void DisableNotificationsByNotifier(const NotifierId& notifier_id) override;
52 void ClickOnNotification(const std::string& id) override;
53 void ClickOnNotificationButton(const std::string& id,
54 int button_index) override;
55 void MarkSinglePopupAsShown(const std::string& id,
56 bool mark_notification_as_read) override;
57 void DisplayedNotification(const std::string& id,
58 const DisplaySource source) override;
59 void SetNotifierSettingsProvider(NotifierSettingsProvider* provider) override;
60 NotifierSettingsProvider* GetNotifierSettingsProvider() override;
61 void SetQuietMode(bool in_quiet_mode) override;
62 void EnterQuietModeWithExpire(const base::TimeDelta& expires_in) override;
63 void SetVisibility(Visibility visible) override;
64 bool IsMessageCenterVisible() const override;
65 void RestartPopupTimers() override;
66 void PausePopupTimers() override;
68 protected:
69 void DisableTimersForTest() override;
71 private:
72 const NotificationList::Notifications empty_notifications_;
74 DISALLOW_COPY_AND_ASSIGN(FakeMessageCenter);
77 } // namespace message_center
79 #endif // UI_MESSAGE_CENTER_FAKE_MESSAGE_CENTER_H_