Index: content/renderer/service_worker/service_worker_script_context.h |
diff --git a/content/renderer/service_worker/service_worker_script_context.h b/content/renderer/service_worker/service_worker_script_context.h |
index eafe16f10e6b2e8fb671c228378061bb51482e66..7bea6bfbf16d1687435d9ecdd514ff741a38f508 100644 |
--- a/content/renderer/service_worker/service_worker_script_context.h |
+++ b/content/renderer/service_worker/service_worker_script_context.h |
@@ -5,7 +5,10 @@ |
#ifndef CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ |
#define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ |
+#include <vector> |
+ |
#include "base/basictypes.h" |
+#include "base/strings/string16.h" |
#include "content/common/service_worker/service_worker_types.h" |
@@ -45,6 +48,9 @@ class ServiceWorkerScriptContext { |
void OnInstallEvent(int active_version_embedded_worker_id); |
void OnFetchEvent(const ServiceWorkerFetchRequest& request); |
+ void OnPostMessage(const base::string16& message, |
+ const std::vector<int>& sent_message_port_ids, |
+ const std::vector<int>& new_routing_ids); |
// Not owned; embedded_context_ owns this. |
EmbeddedWorkerContextClient* embedded_context_; |
@@ -52,7 +58,9 @@ class ServiceWorkerScriptContext { |
// Not owned; this object is destroyed when proxy_ becomes invalid. |
blink::WebServiceWorkerContextProxy* proxy_; |
- // Used by message handlers. |
+ // Used for incoming messages from the browser for which an outgoing response |
+ // back to the browser is expected, the id must be sent back with the |
+ // response. |
int current_request_id_; |
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerScriptContext); |