| 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 #ifndef CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_NETWORK_PROVIDER_H_ | 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_NETWORK_PROVIDER_H_ |
| 6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_NETWORK_PROVIDER_H_ | 6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_NETWORK_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 bool is_parent_frame_secure); | 56 bool is_parent_frame_secure); |
| 57 ServiceWorkerNetworkProvider(); | 57 ServiceWorkerNetworkProvider(); |
| 58 ~ServiceWorkerNetworkProvider() override; | 58 ~ServiceWorkerNetworkProvider() override; |
| 59 | 59 |
| 60 int provider_id() const { return provider_id_; } | 60 int provider_id() const { return provider_id_; } |
| 61 ServiceWorkerProviderContext* context() const { return context_.get(); } | 61 ServiceWorkerProviderContext* context() const { return context_.get(); } |
| 62 | 62 |
| 63 // This method is called for a provider that's associated with a | 63 // This method is called for a provider that's associated with a |
| 64 // running service worker script. The version_id indicates which | 64 // running service worker script. The version_id indicates which |
| 65 // ServiceWorkerVersion should be used. | 65 // ServiceWorkerVersion should be used. |
| 66 void SetServiceWorkerVersionId(int64_t version_id); | 66 void SetServiceWorkerVersionId(int64_t version_id, int embedded_worker_id); |
| 67 | 67 |
| 68 bool IsControlledByServiceWorker() const; | 68 bool IsControlledByServiceWorker() const; |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 const int provider_id_; | 71 const int provider_id_; |
| 72 scoped_refptr<ServiceWorkerProviderContext> context_; | 72 scoped_refptr<ServiceWorkerProviderContext> context_; |
| 73 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerNetworkProvider); | 73 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerNetworkProvider); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 } // namespace content | 76 } // namespace content |
| 77 | 77 |
| 78 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_NETWORK_PROVIDER_H_ | 78 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_NETWORK_PROVIDER_H_ |
| OLD | NEW |