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

Unified Diff: content/renderer/shared_worker/websharedworker_proxy.h

Issue 2586863002: Worker: Enable UseCounter for SharedWorkerGlobalScope (Closed)
Patch Set: replace ExecutionContext with ScriptState Created 3 years, 11 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/renderer/shared_worker/websharedworker_proxy.h
diff --git a/content/renderer/shared_worker/websharedworker_proxy.h b/content/renderer/shared_worker/websharedworker_proxy.h
index 78cd84cfb5506e717eb9640f70eb1a49b0cd61c0..6c7765b65d15caa009d91cf0e74c2add67cc385e 100644
--- a/content/renderer/shared_worker/websharedworker_proxy.h
+++ b/content/renderer/shared_worker/websharedworker_proxy.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_RENDERER_SHARED_WORKER_WEBSHAREDWORKER_PROXY_H_
#define CONTENT_RENDERER_SHARED_WORKER_WEBSHAREDWORKER_PROXY_H_
+#include <set>
+
#include "base/macros.h"
#include "ipc/ipc_listener.h"
#include "third_party/WebKit/public/web/WebSharedWorkerConnectListener.h"
@@ -22,11 +24,9 @@ class MessageRouter;
namespace content {
-// Implementation of the WebSharedWorker APIs. This object is intended to only
-// live long enough to allow the caller to send a "connect" event to the worker
-// thread. Once the connect event has been sent, all future communication will
-// happen via the WebMessagePortChannel. This instance will self-destruct when a
-// connection is established.
+// A proxy between a renderer process hosting a document and the browser
+// process. This instance has the same lifetime as a shared worker, and
+// self-destructs when the worker is destroyed.
class WebSharedWorkerProxy : private IPC::Listener {
public:
// |channel| should be passed with its ownership.
@@ -45,7 +45,9 @@ class WebSharedWorkerProxy : private IPC::Listener {
void OnWorkerCreated();
void OnWorkerScriptLoadFailed();
- void OnWorkerConnected();
+ void OnWorkerConnected(std::set<uint32_t> features);
dcheng 2017/02/03 00:40:40 Nit: const std::set<uint32_t>&
nhiroki 2017/02/03 17:28:22 Done.
+ void OnWorkerDestroyed();
+ void OnCountFeature(uint32_t feature);
// Routing id associated with this worker - used to receive messages from the
// worker, and also to route messages to the worker (WorkerService contains

Powered by Google App Engine
This is Rietveld 408576698