OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #include "content/renderer/shared_worker/embedded_shared_worker_stub.h" | 5 #include "content/renderer/shared_worker/embedded_shared_worker_stub.h" |
6 | 6 |
7 #include "base/message_loop/message_loop_proxy.h" | 7 #include "base/message_loop/message_loop_proxy.h" |
8 #include "content/child/appcache/appcache_dispatcher.h" | 8 #include "content/child/appcache/appcache_dispatcher.h" |
9 #include "content/child/appcache/web_application_cache_host_impl.h" | 9 #include "content/child/appcache/web_application_cache_host_impl.h" |
10 #include "content/child/scoped_child_process_reference.h" | 10 #include "content/child/scoped_child_process_reference.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 ->backend_proxy()) {} | 33 ->backend_proxy()) {} |
34 | 34 |
35 // Main resource loading is different for workers. The main resource is | 35 // Main resource loading is different for workers. The main resource is |
36 // loaded by the worker using WorkerScriptLoader. | 36 // loaded by the worker using WorkerScriptLoader. |
37 // These overrides are stubbed out. | 37 // These overrides are stubbed out. |
38 virtual void willStartMainResourceRequest( | 38 virtual void willStartMainResourceRequest( |
39 blink::WebURLRequest&, | 39 blink::WebURLRequest&, |
40 const blink::WebApplicationCacheHost*) {} | 40 const blink::WebApplicationCacheHost*) {} |
41 virtual void didReceiveResponseForMainResource(const blink::WebURLResponse&) { | 41 virtual void didReceiveResponseForMainResource(const blink::WebURLResponse&) { |
42 } | 42 } |
43 // TODO(tyoshino): Revive didReceiveDataForMainResource once Blink side | 43 virtual void didReceiveDataForMainResource(const char* data, unsigned len) {} |
44 // refactoring is done. See crbug.com/418885. | |
45 virtual void didFinishLoadingMainResource(bool success) {} | 44 virtual void didFinishLoadingMainResource(bool success) {} |
46 | 45 |
47 // Cache selection is also different for workers. We know at construction | 46 // Cache selection is also different for workers. We know at construction |
48 // time what cache to select and do so then. | 47 // time what cache to select and do so then. |
49 // These overrides are stubbed out. | 48 // These overrides are stubbed out. |
50 virtual void selectCacheWithoutManifest() {} | 49 virtual void selectCacheWithoutManifest() {} |
51 virtual bool selectCacheWithManifest(const blink::WebURL& manifestURL) { | 50 virtual bool selectCacheWithManifest(const blink::WebURL& manifestURL) { |
52 return true; | 51 return true; |
53 } | 52 } |
54 }; | 53 }; |
55 } | 54 |
| 55 } // namespace |
56 | 56 |
57 EmbeddedSharedWorkerStub::EmbeddedSharedWorkerStub( | 57 EmbeddedSharedWorkerStub::EmbeddedSharedWorkerStub( |
58 const GURL& url, | 58 const GURL& url, |
59 const base::string16& name, | 59 const base::string16& name, |
60 const base::string16& content_security_policy, | 60 const base::string16& content_security_policy, |
61 blink::WebContentSecurityPolicyType security_policy_type, | 61 blink::WebContentSecurityPolicyType security_policy_type, |
62 bool pause_on_start, | 62 bool pause_on_start, |
63 int route_id) | 63 int route_id) |
64 : route_id_(route_id), | 64 : route_id_(route_id), |
65 name_(name), | 65 name_(name), |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 pending_channels_.push_back(channel); | 212 pending_channels_.push_back(channel); |
213 } | 213 } |
214 } | 214 } |
215 | 215 |
216 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() { | 216 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() { |
217 runing_ = false; | 217 runing_ = false; |
218 impl_->terminateWorkerContext(); | 218 impl_->terminateWorkerContext(); |
219 } | 219 } |
220 | 220 |
221 } // namespace content | 221 } // namespace content |
OLD | NEW |