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 #include "ui/message_center/fake_message_center.h"
6 #include "ui/message_center/notification_list.h"
8 namespace message_center
{
10 FakeMessageCenter::FakeMessageCenter() {
13 FakeMessageCenter::~FakeMessageCenter() {
16 void FakeMessageCenter::AddObserver(MessageCenterObserver
* observer
) {
19 void FakeMessageCenter::RemoveObserver(MessageCenterObserver
* observer
) {
22 void FakeMessageCenter::SetDelegate(Delegate
* delegate
) {
25 size_t FakeMessageCenter::NotificationCount() const {
29 size_t FakeMessageCenter::UnreadNotificationCount() const {
33 bool FakeMessageCenter::HasPopupNotifications() const {
37 bool FakeMessageCenter::HasNotification(const std::string
& id
) {
41 bool FakeMessageCenter::IsQuietMode() const {
45 bool FakeMessageCenter::HasClickedListener(const std::string
& id
) {
49 const NotificationList::Notifications
& FakeMessageCenter::GetNotifications() {
50 return empty_notifications_
;
53 NotificationList::PopupNotifications
54 FakeMessageCenter::GetPopupNotifications() {
55 return NotificationList::PopupNotifications();
58 void FakeMessageCenter::AddNotification(
59 NotificationType type
,
60 const std::string
& id
,
61 const string16
& title
,
62 const string16
& message
,
63 const string16
& display_source
,
64 const std::string
& extension_id
,
65 const base::DictionaryValue
* optional_fields
,
66 NotificationDelegate
* delegate
) {}
68 void FakeMessageCenter::UpdateNotification(
69 const std::string
& old_id
,
70 const std::string
& new_id
,
71 const string16
& title
,
72 const string16
& message
,
73 const base::DictionaryValue
* optional_fields
,
74 NotificationDelegate
* delegate
) {}
76 void FakeMessageCenter::RemoveNotification(const std::string
& id
,
80 void FakeMessageCenter::RemoveAllNotifications(bool by_user
) {
83 void FakeMessageCenter::SetNotificationIcon(const std::string
& notification_id
,
84 const gfx::Image
& image
) {
87 void FakeMessageCenter::SetNotificationImage(const std::string
& notification_id
,
88 const gfx::Image
& image
) {
91 void FakeMessageCenter::SetNotificationButtonIcon(
92 const std::string
& notification_id
,
94 const gfx::Image
& image
) {
97 void FakeMessageCenter::DisableNotificationsByExtension(const std::string
& id
) {
100 void FakeMessageCenter::DisableNotificationsByUrl(const std::string
& id
) {
103 void FakeMessageCenter::ShowNotificationSettings(const std::string
& id
) {
106 void FakeMessageCenter::ShowNotificationSettingsDialog(
107 gfx::NativeView context
) {
110 void FakeMessageCenter::ExpandNotification(const std::string
& id
) {
113 void FakeMessageCenter::ClickOnNotification(const std::string
& id
) {
116 void FakeMessageCenter::ClickOnNotificationButton(const std::string
& id
,
120 void FakeMessageCenter::MarkSinglePopupAsShown(const std::string
& id
,
121 bool mark_notification_as_read
) {
124 void FakeMessageCenter::DisplayedNotification(const std::string
& id
) {
127 void FakeMessageCenter::SetQuietMode(bool in_quiet_mode
) {
130 void FakeMessageCenter::EnterQuietModeWithExpire(
131 const base::TimeDelta
& expires_in
) {
134 void FakeMessageCenter::SetMessageCenterVisible(bool visible
) {
137 } // namespace message_center