| 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 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 void CompleteInternal(ServiceWorkerStatusCode status); | 121 void CompleteInternal(ServiceWorkerStatusCode status); |
| 122 void ResolvePromise(ServiceWorkerStatusCode status, | 122 void ResolvePromise(ServiceWorkerStatusCode status, |
| 123 ServiceWorkerRegistration* registration, | 123 ServiceWorkerRegistration* registration, |
| 124 ServiceWorkerVersion* version); | 124 ServiceWorkerVersion* version); |
| 125 | 125 |
| 126 // EmbeddedWorkerInstance::Listener override of OnPausedAfterDownload. | 126 // EmbeddedWorkerInstance::Listener override of OnPausedAfterDownload. |
| 127 virtual void OnPausedAfterDownload() OVERRIDE; | 127 virtual void OnPausedAfterDownload() OVERRIDE; |
| 128 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 128 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 129 | 129 |
| 130 void OnCompareScriptResourcesComplete( | 130 void OnCompareScriptResourcesComplete( |
| 131 ServiceWorkerVersion* current_version, | 131 ServiceWorkerVersion* most_recent_version, |
| 132 ServiceWorkerStatusCode status, | 132 ServiceWorkerStatusCode status, |
| 133 bool are_equal); | 133 bool are_equal); |
| 134 | 134 |
| 135 void AssociateProviderHostsToRegistration( | 135 void AssociateProviderHostsToRegistration( |
| 136 ServiceWorkerRegistration* registration); | 136 ServiceWorkerRegistration* registration); |
| 137 | 137 |
| 138 // The ServiceWorkerContextCore object should always outlive this. | 138 // The ServiceWorkerContextCore object should always outlive this. |
| 139 base::WeakPtr<ServiceWorkerContextCore> context_; | 139 base::WeakPtr<ServiceWorkerContextCore> context_; |
| 140 | 140 |
| 141 RegistrationJobType job_type_; | 141 RegistrationJobType job_type_; |
| 142 const GURL pattern_; | 142 const GURL pattern_; |
| 143 const GURL script_url_; | 143 const GURL script_url_; |
| 144 std::vector<RegistrationCallback> callbacks_; | 144 std::vector<RegistrationCallback> callbacks_; |
| 145 std::vector<int> pending_process_ids_; | 145 std::vector<int> pending_process_ids_; |
| 146 Phase phase_; | 146 Phase phase_; |
| 147 Internal internal_; | 147 Internal internal_; |
| 148 bool is_promise_resolved_; | 148 bool is_promise_resolved_; |
| 149 ServiceWorkerStatusCode promise_resolved_status_; | 149 ServiceWorkerStatusCode promise_resolved_status_; |
| 150 scoped_refptr<ServiceWorkerRegistration> promise_resolved_registration_; | 150 scoped_refptr<ServiceWorkerRegistration> promise_resolved_registration_; |
| 151 scoped_refptr<ServiceWorkerVersion> promise_resolved_version_; | 151 scoped_refptr<ServiceWorkerVersion> promise_resolved_version_; |
| 152 base::WeakPtrFactory<ServiceWorkerRegisterJob> weak_factory_; | 152 base::WeakPtrFactory<ServiceWorkerRegisterJob> weak_factory_; |
| 153 | 153 |
| 154 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegisterJob); | 154 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegisterJob); |
| 155 }; | 155 }; |
| 156 | 156 |
| 157 } // namespace content | 157 } // namespace content |
| 158 | 158 |
| 159 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_ | 159 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_ |
| OLD | NEW |