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

Unified Diff: content/common/service_worker_messages.h

Issue 118103002: Add IPC stubs between browser and ServiceWorker's worker context in the child process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: content/common/service_worker_messages.h
diff --git a/content/common/service_worker_messages.h b/content/common/service_worker_messages.h
index d2a5eb27602b15e38c9a351eb9bc231da098c5b3..dd6cc4c4699d72b6b67f8dcefd34df9141348885 100644
--- a/content/common/service_worker_messages.h
+++ b/content/common/service_worker_messages.h
@@ -5,9 +5,11 @@
// Message definition file, included multiple times, hence no include guard.
#include "base/strings/string16.h"
+#include "content/common/service_worker_interfaces.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_param_traits.h"
#include "third_party/WebKit/public/platform/WebServiceWorkerError.h"
+#include "third_party/WebKit/public/web/WebContentSecurityPolicy.h"
#include "url/gurl.h"
#undef IPC_MESSAGE_EXPORT
@@ -71,3 +73,34 @@ IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_StartWorker,
// Browser -> Renderer message to terminate the embedded worker.
IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_TerminateWorker,
int /* embedded_worker_id */)
+
+// Renderer -> Browser message to indicate that the worker is started.
+IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_WorkerStarted,
alecflett 2013/12/19 00:59:11 Should the embedded worker messages be called Embe
+ int /* thread_id */,
+ int /* embedded_worker_id */)
+
+// Renderer -> Browser message to indicate that the worker is stopped.
+IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_WorkerStopped,
+ int /* embedded_worker_id */)
+
+// ---------------------------------------------------------------------------
+// For ServiceWorkerContext related messages, which are directly sent from
+// browser to the worker thread in the child process. We use a new message class
+// for this for easier cross-thread message dispatching.
+
+#undef IPC_MESSAGE_START
+#define IPC_MESSAGE_START ServiceWorkerContextMsgStart
+
+// TODO: this will need more fields.
+IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerFetchRequest)
+ IPC_STRUCT_TRAITS_MEMBER(url)
+ IPC_STRUCT_TRAITS_MEMBER(method)
+ IPC_STRUCT_TRAITS_MEMBER(referrer)
+ IPC_STRUCT_TRAITS_MEMBER(headers)
+ IPC_STRUCT_TRAITS_MEMBER(is_main_resource_load)
+IPC_STRUCT_TRAITS_END()
+
+IPC_MESSAGE_CONTROL3(ServiceWorkerContextMsg_FetchEvent,
+ int /* thread_id */,
+ int /* embedded_worker_id */,
+ content::ServiceWorkerFetchRequest)

Powered by Google App Engine
This is Rietveld 408576698