OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_WORKER_WEBSHAREDWORKER_STUB_H_ | 5 #ifndef CONTENT_WORKER_WEBSHAREDWORKER_STUB_H_ |
6 #define CONTENT_WORKER_WEBSHAREDWORKER_STUB_H_ | 6 #define CONTENT_WORKER_WEBSHAREDWORKER_STUB_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/worker/websharedworkerclient_proxy.h" | 10 #include "content/worker/websharedworkerclient_proxy.h" |
11 #include "content/worker/worker_webapplicationcachehost_impl.h" | 11 #include "content/worker/worker_webapplicationcachehost_impl.h" |
12 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
13 #include "ipc/ipc_channel.h" | 13 #include "ipc/ipc_channel.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSharedWorker.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSharedWorker.h" |
15 | 15 |
16 namespace WebKit { | 16 namespace WebKit { |
17 class WebSharedWorker; | 17 class WebSharedWorker; |
18 } | 18 } |
19 | 19 |
20 class SharedWorkerDevToolsAgent; | 20 class SharedWorkerDevToolsAgent; |
21 | 21 |
22 // This class creates a WebSharedWorker, and translates incoming IPCs to the | 22 // This class creates a WebSharedWorker, and translates incoming IPCs to the |
23 // appropriate WebSharedWorker APIs. | 23 // appropriate WebSharedWorker APIs. |
24 class WebSharedWorkerStub : public IPC::Channel::Listener { | 24 class WebSharedWorkerStub : public IPC::Listener { |
25 public: | 25 public: |
26 WebSharedWorkerStub(const string16& name, int route_id, | 26 WebSharedWorkerStub(const string16& name, int route_id, |
27 const WorkerAppCacheInitInfo& appcache_init_info); | 27 const WorkerAppCacheInitInfo& appcache_init_info); |
28 | 28 |
29 // IPC::Channel::Listener implementation. | 29 // IPC::Listener implementation. |
30 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 30 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
31 virtual void OnChannelError() OVERRIDE; | 31 virtual void OnChannelError() OVERRIDE; |
32 | 32 |
33 // Invoked when the WebSharedWorkerClientProxy is shutting down. | 33 // Invoked when the WebSharedWorkerClientProxy is shutting down. |
34 void Shutdown(); | 34 void Shutdown(); |
35 | 35 |
36 // Called after terminating the worker context to make sure that the worker | 36 // Called after terminating the worker context to make sure that the worker |
37 // actually terminates (is not stuck in an infinite loop). | 37 // actually terminates (is not stuck in an infinite loop). |
38 void EnsureWorkerContextTerminates(); | 38 void EnsureWorkerContextTerminates(); |
39 | 39 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 scoped_ptr<SharedWorkerDevToolsAgent> worker_devtools_agent_; | 72 scoped_ptr<SharedWorkerDevToolsAgent> worker_devtools_agent_; |
73 | 73 |
74 typedef std::pair<int, int> PendingConnectInfo; | 74 typedef std::pair<int, int> PendingConnectInfo; |
75 typedef std::vector<PendingConnectInfo> PendingConnectInfoList; | 75 typedef std::vector<PendingConnectInfo> PendingConnectInfoList; |
76 PendingConnectInfoList pending_connects_; | 76 PendingConnectInfoList pending_connects_; |
77 | 77 |
78 DISALLOW_COPY_AND_ASSIGN(WebSharedWorkerStub); | 78 DISALLOW_COPY_AND_ASSIGN(WebSharedWorkerStub); |
79 }; | 79 }; |
80 | 80 |
81 #endif // CONTENT_WORKER_WEBSHAREDWORKER_STUB_H_ | 81 #endif // CONTENT_WORKER_WEBSHAREDWORKER_STUB_H_ |
OLD | NEW |