OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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_EXTENSIONS_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // Quits the message loop if |condition_| is met. | 101 // Quits the message loop if |condition_| is met. |
102 void MaybeQuit(); | 102 void MaybeQuit(); |
103 | 103 |
104 // extensions::ExtensionActionAPI::Observer: | 104 // extensions::ExtensionActionAPI::Observer: |
105 void OnPageActionsUpdated(content::WebContents* contents) override; | 105 void OnPageActionsUpdated(content::WebContents* contents) override; |
106 | 106 |
107 Browser* browser_; | 107 Browser* browser_; |
108 Profile* profile_; | 108 Profile* profile_; |
109 | 109 |
110 content::NotificationRegistrar registrar_; | 110 content::NotificationRegistrar registrar_; |
111 scoped_ptr<content::WindowedNotificationObserver> observer_; | 111 std::unique_ptr<content::WindowedNotificationObserver> observer_; |
112 | 112 |
113 std::string last_loaded_extension_id_; | 113 std::string last_loaded_extension_id_; |
114 int extension_installs_observed_; | 114 int extension_installs_observed_; |
115 int extension_load_errors_observed_; | 115 int extension_load_errors_observed_; |
116 int crx_installers_done_observed_; | 116 int crx_installers_done_observed_; |
117 | 117 |
118 // The condition for which we are waiting. This should be checked in any | 118 // The condition for which we are waiting. This should be checked in any |
119 // observing methods that could trigger it. | 119 // observing methods that could trigger it. |
120 base::Callback<bool(void)> condition_; | 120 base::Callback<bool(void)> condition_; |
121 | 121 |
122 // The closure to quit the currently-running message loop. | 122 // The closure to quit the currently-running message loop. |
123 base::Closure quit_closure_; | 123 base::Closure quit_closure_; |
124 }; | 124 }; |
125 | 125 |
126 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ | 126 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ |
OLD | NEW |