Chromium Code Reviews| 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_CONTEXT_WRAPPER_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 // These methods must only be called from the IO thread. | 125 // These methods must only be called from the IO thread. |
| 126 ServiceWorkerRegistration* GetLiveRegistration(int64_t registration_id); | 126 ServiceWorkerRegistration* GetLiveRegistration(int64_t registration_id); |
| 127 ServiceWorkerVersion* GetLiveVersion(int64_t version_id); | 127 ServiceWorkerVersion* GetLiveVersion(int64_t version_id); |
| 128 std::vector<ServiceWorkerRegistrationInfo> GetAllLiveRegistrationInfo(); | 128 std::vector<ServiceWorkerRegistrationInfo> GetAllLiveRegistrationInfo(); |
| 129 std::vector<ServiceWorkerVersionInfo> GetAllLiveVersionInfo(); | 129 std::vector<ServiceWorkerVersionInfo> GetAllLiveVersionInfo(); |
| 130 | 130 |
| 131 // Must be called from the IO thread. | 131 // Must be called from the IO thread. |
| 132 void HasMainFrameProviderHost(const GURL& origin, | 132 void HasMainFrameProviderHost(const GURL& origin, |
| 133 const BoolCallback& callback) const; | 133 const BoolCallback& callback) const; |
| 134 | 134 |
| 135 // Gets provider hosts render process and frame Ids for the given |origin|. | |
|
falken
2017/07/05 01:55:05
// Returns all render process ids and frame ids fo
gogerald1
2017/07/05 02:26:04
Done.
| |
| 136 std::unique_ptr<std::vector<std::pair<int, int>>> GetProviderHostIds( | |
| 137 const GURL& origin) const; | |
| 138 | |
| 135 // Returns the registration whose scope longest matches |document_url|. It is | 139 // Returns the registration whose scope longest matches |document_url|. It is |
| 136 // guaranteed that the returned registration has the activated worker. | 140 // guaranteed that the returned registration has the activated worker. |
| 137 // | 141 // |
| 138 // - If the registration is not found, returns ERROR_NOT_FOUND. | 142 // - If the registration is not found, returns ERROR_NOT_FOUND. |
| 139 // - If the registration has neither the waiting version nor the active | 143 // - If the registration has neither the waiting version nor the active |
| 140 // version, returns ERROR_NOT_FOUND. | 144 // version, returns ERROR_NOT_FOUND. |
| 141 // - If the registration does not have the active version but has the waiting | 145 // - If the registration does not have the active version but has the waiting |
| 142 // version, activates the waiting version and runs |callback| when it is | 146 // version, activates the waiting version and runs |callback| when it is |
| 143 // activated. | 147 // activated. |
| 144 // | 148 // |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 331 | 335 |
| 332 // The ResourceContext associated with this context. | 336 // The ResourceContext associated with this context. |
| 333 ResourceContext* resource_context_; | 337 ResourceContext* resource_context_; |
| 334 | 338 |
| 335 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper); | 339 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper); |
| 336 }; | 340 }; |
| 337 | 341 |
| 338 } // namespace content | 342 } // namespace content |
| 339 | 343 |
| 340 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 344 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
| OLD | NEW |