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

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

Issue 177043003: Implement SharedWorkerServiceImpl::CreateWorker and SharedWorkerInstance and SharedWorkerHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use std::string and base::StringPiece 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
« no previous file with comments | « no previous file | content/browser/shared_worker/shared_worker_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/shared_worker/shared_worker_host.h
diff --git a/content/browser/shared_worker/shared_worker_host.h b/content/browser/shared_worker/shared_worker_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..b12487c7fd392391815f7cab383e4bff60bf1037
--- /dev/null
+++ b/content/browser/shared_worker/shared_worker_host.h
@@ -0,0 +1,38 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_
+#define CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_
+
+#include <vector>
+
+#include "base/memory/scoped_ptr.h"
+
+namespace content {
+class SharedWorkerMessageFilter;
+class SharedWorkerInstance;
+
+// The SharedWorkerHost is the interface that represents the browser side of
+// the browser <-> worker communication channel.
+class SharedWorkerHost {
+ public:
+ explicit SharedWorkerHost(SharedWorkerInstance* instance);
+ ~SharedWorkerHost();
+
+ // Starts the SharedWorker in the renderer process which is associated with
+ // |filter|.
+ void Init(SharedWorkerMessageFilter* filter);
+
+ SharedWorkerInstance* instance() { return instance_.get(); }
+ int worker_route_id() const { return worker_route_id_; }
+
+ private:
+ scoped_ptr<SharedWorkerInstance> instance_;
+ int worker_route_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(SharedWorkerHost);
+};
+} // namespace content
+
+#endif // CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_
« no previous file with comments | « no previous file | content/browser/shared_worker/shared_worker_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698