| 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 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 using NotificationPair = std::pair<Notification, ProfileID>; | 68 using NotificationPair = std::pair<Notification, ProfileID>; |
| 69 std::vector<NotificationPair> notifications_; | 69 std::vector<NotificationPair> notifications_; |
| 70 | 70 |
| 71 base::Closure notification_added_callback_; | 71 base::Closure notification_added_callback_; |
| 72 | 72 |
| 73 DISALLOW_COPY_AND_ASSIGN(StubNotificationUIManager); | 73 DISALLOW_COPY_AND_ASSIGN(StubNotificationUIManager); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 // Generates notification objects with configurable set of parameters. |
| 77 class NotificationGenerator { |
| 78 public: |
| 79 // Creates a custom notification. |
| 80 static std::unique_ptr<Notification> CreateNotification( |
| 81 const std::string& title, |
| 82 const std::string& subtitle, |
| 83 const std::string& context, |
| 84 const std::string& button1, |
| 85 const std::string& button2, |
| 86 message_center::NotificationType type); |
| 87 |
| 88 // Creates a completly predefined notification for |type|. |
| 89 static std::unique_ptr<Notification> CreateNotification( |
| 90 message_center::NotificationType type); |
| 91 |
| 92 private: |
| 93 // only static methods allowed. |
| 94 DISALLOW_IMPLICIT_CONSTRUCTORS(NotificationGenerator); |
| 95 }; |
| 96 |
| 76 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ | 97 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ |
| OLD | NEW |