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

Unified Diff: content/browser/service_worker/service_worker_test_utils.h

Issue 2638313002: Manage ServiceWorkerDispatcherHost in ServiceWorkerContextCore (Closed)
Patch Set: Rebase Created 3 years, 10 months 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/service_worker/service_worker_test_utils.h
diff --git a/content/browser/service_worker/service_worker_test_utils.h b/content/browser/service_worker/service_worker_test_utils.h
index 467eaf0392236a805363bd5ffcf32854a898693b..279faf37c1c6e87ae7f6db350dbee76ad29fee9a 100644
--- a/content/browser/service_worker/service_worker_test_utils.h
+++ b/content/browser/service_worker/service_worker_test_utils.h
@@ -5,15 +5,22 @@
#ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_TEST_UTILS_H_
#define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_TEST_UTILS_H_
+#include <memory>
+
#include "base/bind.h"
#include "base/callback.h"
#include "base/command_line.h"
+#include "base/memory/weak_ptr.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
+class ServiceWorkerContextCore;
+class ServiceWorkerDispatcherHost;
+class ServiceWorkerProviderHost;
+
template <typename Arg>
void ReceiveResult(BrowserThread::ID run_quit_thread,
const base::Closure& quit,
@@ -39,6 +46,26 @@ base::Callback<void(Arg)> CreateReceiverOnCurrentThread(
return base::Bind(&ReceiveResult<Arg>, id, quit, out);
}
+std::unique_ptr<ServiceWorkerProviderHost> CreateProviderHostForWindow(
+ int process_id,
+ int provider_id,
+ bool is_parent_frame_secure,
+ base::WeakPtr<ServiceWorkerContextCore> context);
+
+std::unique_ptr<ServiceWorkerProviderHost>
+CreateProviderHostForServiceWorkerContext(
+ int process_id,
+ int provider_id,
+ bool is_parent_frame_secure,
+ base::WeakPtr<ServiceWorkerContextCore> context);
+
+std::unique_ptr<ServiceWorkerProviderHost> CreateProviderHostWithDispatcherHost(
+ int process_id,
+ int provider_id,
+ base::WeakPtr<ServiceWorkerContextCore> context,
+ int route_id,
+ ServiceWorkerDispatcherHost* dispatcher_host);
+
} // namespace content
#endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_TEST_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698