OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/service_worker/service_worker_provider_host.h" | 5 #include "content/browser/service_worker/service_worker_provider_host.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "content/browser/frame_host/frame_tree.h" | 8 #include "content/browser/frame_host/frame_tree.h" |
9 #include "content/browser/frame_host/frame_tree_node.h" | 9 #include "content/browser/frame_host/frame_tree_node.h" |
10 #include "content/browser/frame_host/render_frame_host_impl.h" | 10 #include "content/browser/frame_host/render_frame_host_impl.h" |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 return ServiceWorkerClientInfo(); | 302 return ServiceWorkerClientInfo(); |
303 | 303 |
304 // TODO(mlamouri,michaeln): it is possible to end up collecting information | 304 // TODO(mlamouri,michaeln): it is possible to end up collecting information |
305 // for a frame that is actually being navigated and isn't exactly what we are | 305 // for a frame that is actually being navigated and isn't exactly what we are |
306 // expecting. | 306 // expecting. |
307 return ServiceWorkerClientInfo( | 307 return ServiceWorkerClientInfo( |
308 render_frame_host->GetVisibilityState(), | 308 render_frame_host->GetVisibilityState(), |
309 render_frame_host->IsFocused(), | 309 render_frame_host->IsFocused(), |
310 render_frame_host->GetLastCommittedURL(), | 310 render_frame_host->GetLastCommittedURL(), |
311 render_frame_host->GetParent() ? REQUEST_CONTEXT_FRAME_TYPE_NESTED | 311 render_frame_host->GetParent() ? REQUEST_CONTEXT_FRAME_TYPE_NESTED |
312 : REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL); | 312 : REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL, |
| 313 blink::WebServiceWorkerClientTypeWindow); |
313 } | 314 } |
314 | 315 |
315 void ServiceWorkerProviderHost::AddScopedProcessReferenceToPattern( | 316 void ServiceWorkerProviderHost::AddScopedProcessReferenceToPattern( |
316 const GURL& pattern) { | 317 const GURL& pattern) { |
317 associated_patterns_.push_back(pattern); | 318 associated_patterns_.push_back(pattern); |
318 IncreaseProcessReference(pattern); | 319 IncreaseProcessReference(pattern); |
319 } | 320 } |
320 | 321 |
321 void ServiceWorkerProviderHost::ClaimedByRegistration( | 322 void ServiceWorkerProviderHost::ClaimedByRegistration( |
322 ServiceWorkerRegistration* registration) { | 323 ServiceWorkerRegistration* registration) { |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 return context_ != NULL; | 512 return context_ != NULL; |
512 } | 513 } |
513 | 514 |
514 void ServiceWorkerProviderHost::Send(IPC::Message* message) const { | 515 void ServiceWorkerProviderHost::Send(IPC::Message* message) const { |
515 DCHECK(dispatcher_host_); | 516 DCHECK(dispatcher_host_); |
516 DCHECK(IsReadyToSendMessages()); | 517 DCHECK(IsReadyToSendMessages()); |
517 dispatcher_host_->Send(message); | 518 dispatcher_host_->Send(message); |
518 } | 519 } |
519 | 520 |
520 } // namespace content | 521 } // namespace content |
OLD | NEW |