Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: extensions/test/extension_test_notification_observer.h

Issue 2539623002: [Extensions] Move [Chrome]ExtensionTestNotificationObserver into extensions:: (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 EXTENSIONS_TEST_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ 5 #ifndef EXTENSIONS_TEST_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_
6 #define EXTENSIONS_TEST_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ 6 #define EXTENSIONS_TEST_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/callback_list.h" 12 #include "base/callback_list.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/scoped_observer.h" 14 #include "base/scoped_observer.h"
15 #include "content/public/browser/notification_observer.h" 15 #include "content/public/browser/notification_observer.h"
16 #include "content/public/browser/notification_registrar.h" 16 #include "content/public/browser/notification_registrar.h"
17 #include "extensions/browser/process_manager_observer.h" 17 #include "extensions/browser/process_manager_observer.h"
18 18
19 namespace content { 19 namespace content {
20 class BrowserContext; 20 class BrowserContext;
21 class NotificationDetails; 21 class NotificationDetails;
22 class WindowedNotificationObserver; 22 class WindowedNotificationObserver;
23 } 23 }
24 24
25 namespace extensions { 25 namespace extensions {
26 class ProcessManager; 26 class ProcessManager;
27 }
28 27
29 // Test helper class for observing extension-related events. 28 // Test helper class for observing extension-related events.
30 class ExtensionTestNotificationObserver : public content::NotificationObserver { 29 class ExtensionTestNotificationObserver : public content::NotificationObserver {
31 public: 30 public:
32 explicit ExtensionTestNotificationObserver(content::BrowserContext* context); 31 explicit ExtensionTestNotificationObserver(content::BrowserContext* context);
33 ~ExtensionTestNotificationObserver() override; 32 ~ExtensionTestNotificationObserver() override;
34 33
35 // Wait for an extension install error to be raised. Returns true if an 34 // Wait for an extension install error to be raised. Returns true if an
36 // error was raised. 35 // error was raised.
37 bool WaitForExtensionInstallError(); 36 bool WaitForExtensionInstallError();
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // The condition for which we are waiting. This should be checked in any 131 // The condition for which we are waiting. This should be checked in any
133 // observing methods that could trigger it. 132 // observing methods that could trigger it.
134 base::Callback<bool(void)> condition_; 133 base::Callback<bool(void)> condition_;
135 134
136 // The closure to quit the currently-running message loop. 135 // The closure to quit the currently-running message loop.
137 base::Closure quit_closure_; 136 base::Closure quit_closure_;
138 137
139 DISALLOW_COPY_AND_ASSIGN(ExtensionTestNotificationObserver); 138 DISALLOW_COPY_AND_ASSIGN(ExtensionTestNotificationObserver);
140 }; 139 };
141 140
141 } // namespace extensions
142
142 #endif // EXTENSIONS_TEST_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ 143 #endif // EXTENSIONS_TEST_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698