Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ui / message_center / fake_message_center.h
blob22273b8c29c767028d4c3beebb7202485cef0af1
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 virtual ~FakeMessageCenter();
21 // Overridden from FakeMessageCenter.
22 virtual void AddObserver(MessageCenterObserver* observer) OVERRIDE;
23 virtual void RemoveObserver(MessageCenterObserver* observer) OVERRIDE;
24 virtual void AddNotificationBlocker(NotificationBlocker* blocker) OVERRIDE;
25 virtual void RemoveNotificationBlocker(NotificationBlocker* blocker) OVERRIDE;
26 virtual size_t NotificationCount() const OVERRIDE;
27 virtual size_t UnreadNotificationCount() const OVERRIDE;
28 virtual bool HasPopupNotifications() const OVERRIDE;
29 virtual bool IsQuietMode() const OVERRIDE;
30 virtual bool HasClickedListener(const std::string& id) OVERRIDE;
31 virtual message_center::Notification* FindVisibleNotificationById(
32 const std::string& id) OVERRIDE;
33 virtual const NotificationList::Notifications& GetVisibleNotifications()
34 OVERRIDE;
35 virtual NotificationList::PopupNotifications GetPopupNotifications() OVERRIDE;
36 virtual void AddNotification(scoped_ptr<Notification> notification) OVERRIDE;
37 virtual void UpdateNotification(const std::string& old_id,
38 scoped_ptr<Notification> new_notification)
39 OVERRIDE;
41 virtual void RemoveNotification(const std::string& id, bool by_user) OVERRIDE;
42 virtual void RemoveAllNotifications(bool by_user) OVERRIDE;
43 virtual void RemoveAllVisibleNotifications(bool by_user) OVERRIDE;
44 virtual void SetNotificationIcon(const std::string& notification_id,
45 const gfx::Image& image) OVERRIDE;
47 virtual void SetNotificationImage(const std::string& notification_id,
48 const gfx::Image& image) OVERRIDE;
50 virtual void SetNotificationButtonIcon(const std::string& notification_id,
51 int button_index,
52 const gfx::Image& image) OVERRIDE;
53 virtual void DisableNotificationsByNotifier(
54 const NotifierId& notifier_id) OVERRIDE;
55 virtual void ClickOnNotification(const std::string& id) OVERRIDE;
56 virtual void ClickOnNotificationButton(const std::string& id,
57 int button_index) OVERRIDE;
58 virtual void MarkSinglePopupAsShown(const std::string& id,
59 bool mark_notification_as_read) OVERRIDE;
60 virtual void DisplayedNotification(
61 const std::string& id,
62 const DisplaySource source) OVERRIDE;
63 virtual void SetNotifierSettingsProvider(
64 NotifierSettingsProvider* provider) OVERRIDE;
65 virtual NotifierSettingsProvider* GetNotifierSettingsProvider() OVERRIDE;
66 virtual void SetQuietMode(bool in_quiet_mode) OVERRIDE;
67 virtual void EnterQuietModeWithExpire(
68 const base::TimeDelta& expires_in) OVERRIDE;
69 virtual void SetVisibility(Visibility visible) OVERRIDE;
70 virtual bool IsMessageCenterVisible() const OVERRIDE;
71 virtual void RestartPopupTimers() OVERRIDE;
72 virtual void PausePopupTimers() OVERRIDE;
74 protected:
75 virtual void DisableTimersForTest() OVERRIDE;
77 private:
78 const NotificationList::Notifications empty_notifications_;
80 DISALLOW_COPY_AND_ASSIGN(FakeMessageCenter);
83 } // namespace message_center
85 #endif // UI_MESSAGE_CENTER_FAKE_MESSAGE_CENTER_H_