OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "content/worker/websharedworkerclient_proxy.h" | 9 #include "content/worker/websharedworkerclient_proxy.h" |
10 #include "content/worker/worker_webapplicationcachehost_impl.h" | 10 #include "content/worker/worker_webapplicationcachehost_impl.h" |
| 11 #include "webkit/browser/appcache/appcache_executable_handler.h" |
11 #include "ipc/ipc_listener.h" | 12 #include "ipc/ipc_listener.h" |
12 #include "third_party/WebKit/public/web/WebSharedWorker.h" | 13 #include "third_party/WebKit/public/web/WebSharedWorker.h" |
13 #include "url/gurl.h" | 14 #include "url/gurl.h" |
14 | 15 |
15 namespace WebKit { | 16 namespace WebKit { |
16 class WebSharedWorker; | 17 class WebSharedWorker; |
17 } | 18 } |
18 | 19 |
19 namespace content { | 20 namespace content { |
20 | 21 |
(...skipping 28 matching lines...) Expand all Loading... |
49 | 50 |
50 | 51 |
51 private: | 52 private: |
52 virtual ~WebSharedWorkerStub(); | 53 virtual ~WebSharedWorkerStub(); |
53 | 54 |
54 void OnConnect(int sent_message_port_id, int routing_id); | 55 void OnConnect(int sent_message_port_id, int routing_id); |
55 void OnStartWorkerContext( | 56 void OnStartWorkerContext( |
56 const GURL& url, const string16& user_agent, const string16& source_code, | 57 const GURL& url, const string16& user_agent, const string16& source_code, |
57 const string16& content_security_policy, | 58 const string16& content_security_policy, |
58 WebKit::WebContentSecurityPolicyType policy_type); | 59 WebKit::WebContentSecurityPolicyType policy_type); |
59 | 60 void OnStartEmbeddedWorkerContext( |
| 61 const GURL& url, const std::string& raw_source_code); |
| 62 void OnFetchEvent( |
| 63 int request_id, |
| 64 const appcache::AppCacheExecutableHandler::Request& request); |
| 65 void OnInstallEvent(int host_id); |
60 void OnTerminateWorkerContext(); | 66 void OnTerminateWorkerContext(); |
61 | 67 |
62 int route_id_; | 68 int route_id_; |
63 WorkerAppCacheInitInfo appcache_init_info_; | 69 WorkerAppCacheInitInfo appcache_init_info_; |
64 | 70 |
65 // WebSharedWorkerClient that responds to outgoing API calls | 71 // WebSharedWorkerClient that responds to outgoing API calls |
66 // from the worker object. | 72 // from the worker object. |
67 WebSharedWorkerClientProxy client_; | 73 WebSharedWorkerClientProxy client_; |
68 | 74 |
69 WebKit::WebSharedWorker* impl_; | 75 WebKit::WebSharedWorker* impl_; |
70 string16 name_; | 76 string16 name_; |
71 bool started_; | 77 bool started_; |
72 GURL url_; | 78 GURL url_; |
73 scoped_ptr<SharedWorkerDevToolsAgent> worker_devtools_agent_; | 79 scoped_ptr<SharedWorkerDevToolsAgent> worker_devtools_agent_; |
74 | 80 |
75 typedef std::pair<int, int> PendingConnectInfo; | 81 typedef std::pair<int, int> PendingConnectInfo; |
76 typedef std::vector<PendingConnectInfo> PendingConnectInfoList; | 82 typedef std::vector<PendingConnectInfo> PendingConnectInfoList; |
77 PendingConnectInfoList pending_connects_; | 83 PendingConnectInfoList pending_connects_; |
78 | 84 |
| 85 bool is_embedded_worker_; |
| 86 |
79 DISALLOW_COPY_AND_ASSIGN(WebSharedWorkerStub); | 87 DISALLOW_COPY_AND_ASSIGN(WebSharedWorkerStub); |
80 }; | 88 }; |
81 | 89 |
82 } // namespace content | 90 } // namespace content |
83 | 91 |
84 #endif // CONTENT_WORKER_WEBSHAREDWORKER_STUB_H_ | 92 #endif // CONTENT_WORKER_WEBSHAREDWORKER_STUB_H_ |
OLD | NEW |