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

Unified Diff: content/browser/shared_worker/shared_worker_service_impl.h

Issue 166273002: Add SharedWorkerMessageFilter for the embedded SharedWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated kinuko's comments. Created 6 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/shared_worker/shared_worker_service_impl.h
diff --git a/content/browser/shared_worker/shared_worker_service_impl.h b/content/browser/shared_worker/shared_worker_service_impl.h
index 4126cbc1297d811777227b1cd3fa81ae3b85b0b0..4d5d8a0258841a627fa4e2d36d8ce25282c88937 100644
--- a/content/browser/shared_worker/shared_worker_service_impl.h
+++ b/content/browser/shared_worker/shared_worker_service_impl.h
@@ -12,11 +12,20 @@
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/worker_service.h"
+struct ViewHostMsg_CreateWorker_Params;
+
+namespace IPC {
+class Message;
+}
+
namespace content {
+class SharedWorkerMessageFilter;
+class ResourceContext;
class WorkerServiceObserver;
+class WorkerStoragePartition;
-// If "enable-embedded-shared-worker" is set this class will be used in stead of
+// If "enable-embedded-shared-worker" is set this class will be used instead of
// WorkerServiceImpl.
// TODO(horo): implement this class.
class CONTENT_EXPORT SharedWorkerServiceImpl
@@ -31,6 +40,48 @@ class CONTENT_EXPORT SharedWorkerServiceImpl
virtual void AddObserver(WorkerServiceObserver* observer) OVERRIDE;
virtual void RemoveObserver(WorkerServiceObserver* observer) OVERRIDE;
+ // These methods correspond to worker related IPCs.
+ void CreateWorker(const ViewHostMsg_CreateWorker_Params& params,
+ int route_id,
+ SharedWorkerMessageFilter* filter,
+ ResourceContext* resource_context,
+ const WorkerStoragePartition& worker_partition,
+ bool* url_mismatch);
+ void ForwardToWorker(const IPC::Message& message,
+ SharedWorkerMessageFilter* filter);
+ void DocumentDetached(unsigned long long document_id,
+ SharedWorkerMessageFilter* filter);
+ void WorkerContextClosed(int worker_route_id,
+ SharedWorkerMessageFilter* filter);
+ void WorkerContextDestroyed(int worker_route_id,
+ SharedWorkerMessageFilter* filter);
+ void WorkerScriptLoaded(int worker_route_id,
+ SharedWorkerMessageFilter* filter);
+ void WorkerScriptLoadFailed(int worker_route_id,
+ SharedWorkerMessageFilter* filter);
+ void WorkerConnected(int message_port_id,
+ int worker_route_id,
+ SharedWorkerMessageFilter* filter);
+ void AllowDatabase(int worker_route_id,
+ const GURL& url,
+ const base::string16& name,
+ const base::string16& display_name,
+ unsigned long estimated_size,
+ bool* result,
+ SharedWorkerMessageFilter* filter);
+ void AllowFileSystem(int worker_route_id,
+ const GURL& url,
+ bool* result,
+ SharedWorkerMessageFilter* filter);
+ void AllowIndexedDB(int worker_route_id,
+ const GURL& url,
+ const base::string16& name,
+ bool* result,
+ SharedWorkerMessageFilter* filter);
+
+ void OnSharedWorkerMessageFilterClosing(
+ SharedWorkerMessageFilter* filter);
+
private:
friend struct DefaultSingletonTraits<SharedWorkerServiceImpl>;

Powered by Google App Engine
This is Rietveld 408576698