| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 ProfileID profile_id) const override; | 63 ProfileID profile_id) const override; |
| 64 bool CancelById(const std::string& delegate_id, | 64 bool CancelById(const std::string& delegate_id, |
| 65 ProfileID profile_id) override; | 65 ProfileID profile_id) override; |
| 66 std::set<std::string> GetAllIdsByProfileAndSourceOrigin( | 66 std::set<std::string> GetAllIdsByProfileAndSourceOrigin( |
| 67 ProfileID profile_id, | 67 ProfileID profile_id, |
| 68 const GURL& source) override; | 68 const GURL& source) override; |
| 69 std::set<std::string> GetAllIdsByProfile(ProfileID profile_id) override; | 69 std::set<std::string> GetAllIdsByProfile(ProfileID profile_id) override; |
| 70 bool CancelAllBySourceOrigin(const GURL& source_origin) override; | 70 bool CancelAllBySourceOrigin(const GURL& source_origin) override; |
| 71 bool CancelAllByProfile(ProfileID profile_id) override; | 71 bool CancelAllByProfile(ProfileID profile_id) override; |
| 72 void CancelAll() override; | 72 void CancelAll() override; |
| 73 void StartShutdown() override; |
| 73 | 74 |
| 74 private: | 75 private: |
| 75 using NotificationPair = std::pair<Notification, ProfileID>; | 76 using NotificationPair = std::pair<Notification, ProfileID>; |
| 76 std::vector<NotificationPair> notifications_; | 77 std::vector<NotificationPair> notifications_; |
| 77 | 78 |
| 78 base::Closure notification_added_callback_; | 79 base::Closure notification_added_callback_; |
| 79 | 80 |
| 81 bool is_shutdown_started_ = false; |
| 82 |
| 80 DISALLOW_COPY_AND_ASSIGN(StubNotificationUIManager); | 83 DISALLOW_COPY_AND_ASSIGN(StubNotificationUIManager); |
| 81 }; | 84 }; |
| 82 | 85 |
| 83 // Helper class that has to be created in the stack to check if the fullscreen | 86 // Helper class that has to be created in the stack to check if the fullscreen |
| 84 // setting of a browser is in the desired state. | 87 // setting of a browser is in the desired state. |
| 85 class FullscreenStateWaiter { | 88 class FullscreenStateWaiter { |
| 86 public: | 89 public: |
| 87 FullscreenStateWaiter(Browser* browser, bool desired_state); | 90 FullscreenStateWaiter(Browser* browser, bool desired_state); |
| 88 | 91 |
| 89 void Wait(); | 92 void Wait(); |
| 90 | 93 |
| 91 private: | 94 private: |
| 92 Browser* browser_; | 95 Browser* browser_; |
| 93 bool desired_state_; | 96 bool desired_state_; |
| 94 | 97 |
| 95 DISALLOW_COPY_AND_ASSIGN(FullscreenStateWaiter); | 98 DISALLOW_COPY_AND_ASSIGN(FullscreenStateWaiter); |
| 96 }; | 99 }; |
| 97 | 100 |
| 98 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ | 101 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ |
| OLD | NEW |