Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / ui / message_center / fake_message_center.h
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.
4
5 #ifndef UI_MESSAGE_CENTER_FAKE_MESSAGE_CENTER_H_
6 #define UI_MESSAGE_CENTER_FAKE_MESSAGE_CENTER_H_
7
8 #include "ui/message_center/message_center.h"
9 #include "ui/message_center/message_center_types.h"
10
11 namespace message_center {
12
13 class NotificationDelegate;
14
15 // MessageCenter implementation of doing nothing. Useful for tests.
16 class FakeMessageCenter : public MessageCenter {
17  public:
18   FakeMessageCenter();
19   ~FakeMessageCenter() override;
20
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;
38
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;
44
45   void SetNotificationImage(const std::string& notification_id,
46                             const gfx::Image& image) override;
47
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;
67
68  protected:
69   void DisableTimersForTest() override;
70
71  private:
72   const NotificationList::Notifications empty_notifications_;
73
74   DISALLOW_COPY_AND_ASSIGN(FakeMessageCenter);
75 };
76
77 }  // namespace message_center
78
79 #endif  // UI_MESSAGE_CENTER_FAKE_MESSAGE_CENTER_H_