OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_ |
| 6 #define CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/memory/scoped_ptr.h" |
| 11 |
| 12 namespace content { |
| 13 class SharedWorkerMessageFilter; |
| 14 class SharedWorkerInstance; |
| 15 |
| 16 // The SharedWorkerHost is the interface that represents the browser side of |
| 17 // the browser <-> worker communication channel. |
| 18 class SharedWorkerHost { |
| 19 public: |
| 20 explicit SharedWorkerHost(SharedWorkerInstance* instance); |
| 21 ~SharedWorkerHost(); |
| 22 |
| 23 // Starts the SharedWorker in the renderer process which is associated with |
| 24 // |filter|. |
| 25 void Init(SharedWorkerMessageFilter* filter); |
| 26 |
| 27 SharedWorkerInstance* instance() { return instance_.get(); } |
| 28 int worker_route_id() const { return worker_route_id_; } |
| 29 |
| 30 private: |
| 31 scoped_ptr<SharedWorkerInstance> instance_; |
| 32 int worker_route_id_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(SharedWorkerHost); |
| 35 }; |
| 36 } // namespace content |
| 37 |
| 38 #endif // CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_ |
OLD | NEW |