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

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

Issue 2586863002: Worker: Enable UseCounter for SharedWorkerGlobalScope (Closed)
Patch Set: simplify 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/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..1e561fd15af906e6870b946dfcf1de5f7dd142fa 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(const std::set<uint32_t>& used_features);
+ 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
« no previous file with comments | « content/renderer/shared_worker/shared_worker_repository.cc ('k') | content/renderer/shared_worker/websharedworker_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698