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 <stdint.h> | 7 #include <stdint.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
(...skipping 95 matching lines...) Loading... |
106 GetNetworkProviderFromDataSource(&data_source); | 106 GetNetworkProviderFromDataSource(&data_source); |
107 if (provider->context()->controller()) | 107 if (provider->context()->controller()) |
108 return provider->context()->controller()->version_id(); | 108 return provider->context()->controller()->version_id(); |
109 return kInvalidServiceWorkerVersionId; | 109 return kInvalidServiceWorkerVersionId; |
110 } | 110 } |
111 | 111 |
112 private: | 112 private: |
113 ServiceWorkerNetworkProvider* GetNetworkProviderFromDataSource( | 113 ServiceWorkerNetworkProvider* GetNetworkProviderFromDataSource( |
114 const blink::WebDataSource* data_source) { | 114 const blink::WebDataSource* data_source) { |
115 return ServiceWorkerNetworkProvider::FromDocumentState( | 115 return ServiceWorkerNetworkProvider::FromDocumentState( |
116 static_cast<DataSourceExtraData*>(data_source->extraData())); | 116 static_cast<DataSourceExtraData*>(data_source->getExtraData())); |
117 } | 117 } |
118 }; | 118 }; |
119 | 119 |
120 } // namespace | 120 } // namespace |
121 | 121 |
122 EmbeddedSharedWorkerStub::EmbeddedSharedWorkerStub( | 122 EmbeddedSharedWorkerStub::EmbeddedSharedWorkerStub( |
123 const GURL& url, | 123 const GURL& url, |
124 const base::string16& name, | 124 const base::string16& name, |
125 const base::string16& content_security_policy, | 125 const base::string16& content_security_policy, |
126 blink::WebContentSecurityPolicyType security_policy_type, | 126 blink::WebContentSecurityPolicyType security_policy_type, |
(...skipping 171 matching lines...) Loading... |
298 } | 298 } |
299 } | 299 } |
300 | 300 |
301 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() { | 301 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() { |
302 // After this we wouldn't get any IPC for this stub. | 302 // After this we wouldn't get any IPC for this stub. |
303 running_ = false; | 303 running_ = false; |
304 impl_->terminateWorkerContext(); | 304 impl_->terminateWorkerContext(); |
305 } | 305 } |
306 | 306 |
307 } // namespace content | 307 } // namespace content |
OLD | NEW |