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/message_port_message_filter.h" | 8 #include "content/browser/message_port_message_filter.h" |
9 #include "content/browser/service_worker/service_worker_context_core.h" | 9 #include "content/browser/service_worker/service_worker_context_core.h" |
10 #include "content/browser/service_worker/service_worker_context_request_handler.
h" | 10 #include "content/browser/service_worker/service_worker_context_request_handler.
h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 ServiceWorkerRegistration* registration) { | 53 ServiceWorkerRegistration* registration) { |
54 DCHECK_EQ(associated_registration_.get(), registration); | 54 DCHECK_EQ(associated_registration_.get(), registration); |
55 DisassociateRegistration(); | 55 DisassociateRegistration(); |
56 } | 56 } |
57 | 57 |
58 void ServiceWorkerProviderHost::SetDocumentUrl(const GURL& url) { | 58 void ServiceWorkerProviderHost::SetDocumentUrl(const GURL& url) { |
59 DCHECK(!url.has_ref()); | 59 DCHECK(!url.has_ref()); |
60 document_url_ = url; | 60 document_url_ = url; |
61 } | 61 } |
62 | 62 |
| 63 void ServiceWorkerProviderHost::SetTopmostFrameUrl(const GURL& url) { |
| 64 topmost_frame_url_ = url; |
| 65 } |
| 66 |
63 void ServiceWorkerProviderHost::SetControllerVersionAttribute( | 67 void ServiceWorkerProviderHost::SetControllerVersionAttribute( |
64 ServiceWorkerVersion* version) { | 68 ServiceWorkerVersion* version) { |
65 if (version == controlling_version_.get()) | 69 if (version == controlling_version_.get()) |
66 return; | 70 return; |
67 | 71 |
68 scoped_refptr<ServiceWorkerVersion> previous_version = controlling_version_; | 72 scoped_refptr<ServiceWorkerVersion> previous_version = controlling_version_; |
69 controlling_version_ = version; | 73 controlling_version_ = version; |
70 if (version) | 74 if (version) |
71 version->AddControllee(this); | 75 version->AddControllee(this); |
72 if (previous_version.get()) | 76 if (previous_version.get()) |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 context_->process_manager()->RemoveProcessReferenceFromPattern( | 244 context_->process_manager()->RemoveProcessReferenceFromPattern( |
241 pattern, process_id_); | 245 pattern, process_id_); |
242 } | 246 } |
243 } | 247 } |
244 | 248 |
245 bool ServiceWorkerProviderHost::IsContextAlive() { | 249 bool ServiceWorkerProviderHost::IsContextAlive() { |
246 return context_ != NULL; | 250 return context_ != NULL; |
247 } | 251 } |
248 | 252 |
249 } // namespace content | 253 } // namespace content |
OLD | NEW |