| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/system/web_notification/web_notification_tray.h" | 5 #include "ash/system/web_notification/web_notification_tray.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 virtual void DisableExtension(const std::string& notifcation_id) { | 53 virtual void DisableExtension(const std::string& notifcation_id) { |
| 54 } | 54 } |
| 55 | 55 |
| 56 virtual void DisableNotificationsFromSource( | 56 virtual void DisableNotificationsFromSource( |
| 57 const std::string& notifcation_id) { | 57 const std::string& notifcation_id) { |
| 58 } | 58 } |
| 59 | 59 |
| 60 virtual void ShowSettings(const std::string& notifcation_id) { | 60 virtual void ShowSettings(const std::string& notifcation_id) { |
| 61 } | 61 } |
| 62 | 62 |
| 63 virtual void ShowSettingsDialog(gfx::NativeView context) { |
| 64 } |
| 65 |
| 63 virtual void OnClicked(const std::string& notifcation_id) { | 66 virtual void OnClicked(const std::string& notifcation_id) { |
| 64 } | 67 } |
| 65 | 68 |
| 66 void AddNotification(WebNotificationTray* tray, const std::string& id) { | 69 void AddNotification(WebNotificationTray* tray, const std::string& id) { |
| 67 notification_ids_.insert(id); | 70 notification_ids_.insert(id); |
| 68 tray->message_center()->AddNotification( | 71 tray->message_center()->AddNotification( |
| 69 ui::notifications::NOTIFICATION_TYPE_SIMPLE, | 72 ui::notifications::NOTIFICATION_TYPE_SIMPLE, |
| 70 id, | 73 id, |
| 71 ASCIIToUTF16("Test Web Notification"), | 74 ASCIIToUTF16("Test Web Notification"), |
| 72 ASCIIToUTF16("Notification message body."), | 75 ASCIIToUTF16("Notification message body."), |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 tray->HidePopupBubble(); | 210 tray->HidePopupBubble(); |
| 208 tray->ShowPopupBubble(); | 211 tray->ShowPopupBubble(); |
| 209 EXPECT_TRUE(tray->popup_bubble() != NULL); | 212 EXPECT_TRUE(tray->popup_bubble() != NULL); |
| 210 EXPECT_EQ(notifications_to_add, | 213 EXPECT_EQ(notifications_to_add, |
| 211 tray->message_center()->NotificationCount()); | 214 tray->message_center()->NotificationCount()); |
| 212 EXPECT_EQ(NotificationList::kMaxVisiblePopupNotifications, | 215 EXPECT_EQ(NotificationList::kMaxVisiblePopupNotifications, |
| 213 tray->GetPopupBubbleForTest()->NumMessageViewsForTest()); | 216 tray->GetPopupBubbleForTest()->NumMessageViewsForTest()); |
| 214 } | 217 } |
| 215 | 218 |
| 216 } // namespace ash | 219 } // namespace ash |
| OLD | NEW |