Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Side by Side Diff: content/renderer/shared_worker/embedded_shared_worker_stub.cc

Issue 1149383004: [3/5 chromium] Shows the clients which are controlled by ServiceWorker in DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated nhiroki's comment Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.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/request_extra_data.h" 10 #include "content/child/request_extra_data.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 ChildThreadImpl::current()->thread_safe_sender()); 230 ChildThreadImpl::current()->thread_safe_sender());
231 } 231 }
232 232
233 blink::WebServiceWorkerNetworkProvider* 233 blink::WebServiceWorkerNetworkProvider*
234 EmbeddedSharedWorkerStub::createServiceWorkerNetworkProvider( 234 EmbeddedSharedWorkerStub::createServiceWorkerNetworkProvider(
235 blink::WebDataSource* data_source) { 235 blink::WebDataSource* data_source) {
236 // Create a content::ServiceWorkerNetworkProvider for this data source so 236 // Create a content::ServiceWorkerNetworkProvider for this data source so
237 // we can observe its requests. 237 // we can observe its requests.
238 scoped_ptr<ServiceWorkerNetworkProvider> provider( 238 scoped_ptr<ServiceWorkerNetworkProvider> provider(
239 new ServiceWorkerNetworkProvider( 239 new ServiceWorkerNetworkProvider(
240 MSG_ROUTING_NONE, SERVICE_WORKER_PROVIDER_FOR_SHARED_WORKER)); 240 route_id_, SERVICE_WORKER_PROVIDER_FOR_SHARED_WORKER));
241 241
242 // The provider is kept around for the lifetime of the DataSource 242 // The provider is kept around for the lifetime of the DataSource
243 // and ownership is transferred to the DataSource. 243 // and ownership is transferred to the DataSource.
244 DataSourceExtraData* extra_data = new DataSourceExtraData(); 244 DataSourceExtraData* extra_data = new DataSourceExtraData();
245 data_source->setExtraData(extra_data); 245 data_source->setExtraData(extra_data);
246 ServiceWorkerNetworkProvider::AttachToDocumentState( 246 ServiceWorkerNetworkProvider::AttachToDocumentState(
247 extra_data, provider.Pass()); 247 extra_data, provider.Pass());
248 248
249 // Blink is responsible for deleting the returned object. 249 // Blink is responsible for deleting the returned object.
250 return new WebServiceWorkerNetworkProviderImpl(); 250 return new WebServiceWorkerNetworkProviderImpl();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 pending_channels_.push_back(channel); 288 pending_channels_.push_back(channel);
289 } 289 }
290 } 290 }
291 291
292 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() { 292 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() {
293 runing_ = false; 293 runing_ = false;
294 impl_->terminateWorkerContext(); 294 impl_->terminateWorkerContext();
295 } 295 }
296 296
297 } // namespace content 297 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698