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/browser/service_worker/service_worker_registration_handle.h" | 5 #include "content/browser/service_worker/service_worker_registration_handle.h" |
6 | 6 |
7 #include "content/browser/service_worker/service_worker_context_core.h" | 7 #include "content/browser/service_worker/service_worker_context_core.h" |
8 #include "content/browser/service_worker/service_worker_handle.h" | 8 #include "content/browser/service_worker/service_worker_handle.h" |
9 #include "content/common/service_worker/service_worker_messages.h" | 9 #include "content/common/service_worker/service_worker_messages.h" |
10 #include "content/common/service_worker/service_worker_types.h" | 10 #include "content/common/service_worker/service_worker_types.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 ServiceWorkerRegistrationHandle::~ServiceWorkerRegistrationHandle() { | 41 ServiceWorkerRegistrationHandle::~ServiceWorkerRegistrationHandle() { |
42 DCHECK(registration_.get()); | 42 DCHECK(registration_.get()); |
43 registration_->RemoveListener(this); | 43 registration_->RemoveListener(this); |
44 } | 44 } |
45 | 45 |
46 ServiceWorkerRegistrationObjectInfo | 46 ServiceWorkerRegistrationObjectInfo |
47 ServiceWorkerRegistrationHandle::GetObjectInfo() { | 47 ServiceWorkerRegistrationHandle::GetObjectInfo() { |
48 ServiceWorkerRegistrationObjectInfo info; | 48 ServiceWorkerRegistrationObjectInfo info; |
49 info.handle_id = handle_id_; | 49 info.handle_id = handle_id_; |
50 info.scope = registration_->pattern(); | 50 info.options.scope = registration_->pattern(); |
51 info.registration_id = registration_->id(); | 51 info.registration_id = registration_->id(); |
52 return info; | 52 return info; |
53 } | 53 } |
54 | 54 |
55 void ServiceWorkerRegistrationHandle::IncrementRefCount() { | 55 void ServiceWorkerRegistrationHandle::IncrementRefCount() { |
56 DCHECK_GT(ref_count_, 0); | 56 DCHECK_GT(ref_count_, 0); |
57 ++ref_count_; | 57 ++ref_count_; |
58 } | 58 } |
59 | 59 |
60 void ServiceWorkerRegistrationHandle::DecrementRefCount() { | 60 void ServiceWorkerRegistrationHandle::DecrementRefCount() { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 if (!provider_host_) | 98 if (!provider_host_) |
99 return; // Could be nullptr in some tests. | 99 return; // Could be nullptr in some tests. |
100 provider_host_->SendSetVersionAttributesMessage(handle_id_, | 100 provider_host_->SendSetVersionAttributesMessage(handle_id_, |
101 changed_mask, | 101 changed_mask, |
102 installing_version, | 102 installing_version, |
103 waiting_version, | 103 waiting_version, |
104 active_version); | 104 active_version); |
105 } | 105 } |
106 | 106 |
107 } // namespace content | 107 } // namespace content |
OLD | NEW |