| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // ServiceWorkerRegisterJobBase implementation: | 51 // ServiceWorkerRegisterJobBase implementation: |
| 52 virtual void Start() OVERRIDE; | 52 virtual void Start() OVERRIDE; |
| 53 virtual bool Equals(ServiceWorkerRegisterJobBase* job) OVERRIDE; | 53 virtual bool Equals(ServiceWorkerRegisterJobBase* job) OVERRIDE; |
| 54 virtual RegistrationJobType GetType() OVERRIDE; | 54 virtual RegistrationJobType GetType() OVERRIDE; |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 void HandleExistingRegistrationAndContinue( | 57 void HandleExistingRegistrationAndContinue( |
| 58 ServiceWorkerStatusCode status, | 58 ServiceWorkerStatusCode status, |
| 59 const scoped_refptr<ServiceWorkerRegistration>& registration); | 59 const scoped_refptr<ServiceWorkerRegistration>& registration); |
| 60 void RegisterAndContinue(ServiceWorkerStatusCode status); | 60 void RegisterAndContinue(ServiceWorkerStatusCode status); |
| 61 void StartWorkerAndContinue(ServiceWorkerStatusCode status); | 61 void StartWorkerAndContinue(ServiceWorkerRegistration* registration, |
| 62 void Complete(ServiceWorkerStatusCode status); | 62 ServiceWorkerStatusCode status); |
| 63 void Complete(ServiceWorkerRegistration* registration, |
| 64 ServiceWorkerStatusCode status); |
| 63 | 65 |
| 64 // The ServiceWorkerStorage object should always outlive this. | 66 // The ServiceWorkerStorage object should always outlive this. |
| 65 base::WeakPtr<ServiceWorkerContextCore> context_; | 67 base::WeakPtr<ServiceWorkerContextCore> context_; |
| 66 scoped_refptr<ServiceWorkerRegistration> registration_; | |
| 67 scoped_refptr<ServiceWorkerVersion> pending_version_; | 68 scoped_refptr<ServiceWorkerVersion> pending_version_; |
| 68 const GURL pattern_; | 69 const GURL pattern_; |
| 69 const GURL script_url_; | 70 const GURL script_url_; |
| 70 std::vector<RegistrationCallback> callbacks_; | 71 std::vector<RegistrationCallback> callbacks_; |
| 71 std::vector<int> pending_process_ids_; | 72 std::vector<int> pending_process_ids_; |
| 72 base::WeakPtrFactory<ServiceWorkerRegisterJob> weak_factory_; | 73 base::WeakPtrFactory<ServiceWorkerRegisterJob> weak_factory_; |
| 73 | 74 |
| 74 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegisterJob); | 75 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegisterJob); |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 } // namespace content | 78 } // namespace content |
| 78 | 79 |
| 79 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_ | 80 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_ |
| OLD | NEW |