OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "chrome/browser/ui/views/message_center/web_notification_tray_win.h" | 5 #include "chrome/browser/ui/views/message_center/web_notification_tray_win.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
10 #include "ash/system/status_area_widget.h" | 10 #include "ash/system/status_area_widget.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 bool by_user) OVERRIDE { | 45 bool by_user) OVERRIDE { |
46 notification_ids_.erase(notification_id); | 46 notification_ids_.erase(notification_id); |
47 } | 47 } |
48 | 48 |
49 virtual void DisableNotificationsFromSource( | 49 virtual void DisableNotificationsFromSource( |
50 const std::string& notification_id) OVERRIDE { | 50 const std::string& notification_id) OVERRIDE { |
51 } | 51 } |
52 | 52 |
53 virtual void DisableExtension(const std::string& notification_id) OVERRIDE { } | 53 virtual void DisableExtension(const std::string& notification_id) OVERRIDE { } |
54 virtual void ShowSettings(const std::string& notification_id) OVERRIDE { } | 54 virtual void ShowSettings(const std::string& notification_id) OVERRIDE { } |
| 55 virtual void ShowSettingsDialog(gfx::NativeView context) OVERRIDE { } |
55 virtual void OnClicked(const std::string& notification_id) OVERRIDE { } | 56 virtual void OnClicked(const std::string& notification_id) OVERRIDE { } |
56 virtual void ShowSettingsDialog(gfx::NativeView context) OVERRIDE { } | 57 virtual void OnButtonClicked(const std::string& id, |
57 | 58 int button_index) OVERRIDE {} |
58 | 59 |
59 void AddNotification(const std::string& id) { | 60 void AddNotification(const std::string& id) { |
60 notification_ids_.insert(id); | 61 notification_ids_.insert(id); |
61 message_center_->AddNotification( | 62 message_center_->AddNotification( |
62 message_center::NOTIFICATION_TYPE_SIMPLE, | 63 message_center::NOTIFICATION_TYPE_SIMPLE, |
63 id, | 64 id, |
64 ASCIIToUTF16("Test Web Notification"), | 65 ASCIIToUTF16("Test Web Notification"), |
65 ASCIIToUTF16("Notification message body."), | 66 ASCIIToUTF16("Notification message body."), |
66 ASCIIToUTF16("www.test.org"), | 67 ASCIIToUTF16("www.test.org"), |
67 "" /* extension id */, | 68 "" /* extension id */, |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 EXPECT_TRUE(tray->message_center_tray_->popups_visible()); | 207 EXPECT_TRUE(tray->message_center_tray_->popups_visible()); |
207 EXPECT_EQ(notifications_to_add, | 208 EXPECT_EQ(notifications_to_add, |
208 message_center->NotificationCount()); | 209 message_center->NotificationCount()); |
209 EXPECT_EQ(NotificationList::kMaxVisiblePopupNotifications, | 210 EXPECT_EQ(NotificationList::kMaxVisiblePopupNotifications, |
210 tray->GetPopupBubbleForTest()->NumMessageViewsForTest()); | 211 tray->GetPopupBubbleForTest()->NumMessageViewsForTest()); |
211 message_center->SetDelegate(NULL); | 212 message_center->SetDelegate(NULL); |
212 message_center->notification_list()->RemoveAllNotifications(); | 213 message_center->notification_list()->RemoveAllNotifications(); |
213 } | 214 } |
214 | 215 |
215 } // namespace message_center | 216 } // namespace message_center |
OLD | NEW |