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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 // These methods must only be called from the IO thread. | 128 // These methods must only be called from the IO thread. |
129 ServiceWorkerRegistration* GetLiveRegistration(int64_t registration_id); | 129 ServiceWorkerRegistration* GetLiveRegistration(int64_t registration_id); |
130 ServiceWorkerVersion* GetLiveVersion(int64_t version_id); | 130 ServiceWorkerVersion* GetLiveVersion(int64_t version_id); |
131 std::vector<ServiceWorkerRegistrationInfo> GetAllLiveRegistrationInfo(); | 131 std::vector<ServiceWorkerRegistrationInfo> GetAllLiveRegistrationInfo(); |
132 std::vector<ServiceWorkerVersionInfo> GetAllLiveVersionInfo(); | 132 std::vector<ServiceWorkerVersionInfo> GetAllLiveVersionInfo(); |
133 | 133 |
134 // Must be called from the IO thread. | 134 // Must be called from the IO thread. |
135 void HasMainFrameProviderHost(const GURL& origin, | 135 void HasMainFrameProviderHost(const GURL& origin, |
136 const BoolCallback& callback) const; | 136 const BoolCallback& callback) const; |
137 | 137 |
| 138 // Returns all render process ids and frame ids for the given |origin|. |
| 139 std::unique_ptr< |
| 140 std::vector<std::pair<int /* render process id */, int /* frame id */>>> |
| 141 GetProviderHostIds(const GURL& origin) const; |
| 142 |
138 // Returns the registration whose scope longest matches |document_url|. It is | 143 // Returns the registration whose scope longest matches |document_url|. It is |
139 // guaranteed that the returned registration has the activated worker. | 144 // guaranteed that the returned registration has the activated worker. |
140 // | 145 // |
141 // - If the registration is not found, returns ERROR_NOT_FOUND. | 146 // - If the registration is not found, returns ERROR_NOT_FOUND. |
142 // - If the registration has neither the waiting version nor the active | 147 // - If the registration has neither the waiting version nor the active |
143 // version, returns ERROR_NOT_FOUND. | 148 // version, returns ERROR_NOT_FOUND. |
144 // - If the registration does not have the active version but has the waiting | 149 // - If the registration does not have the active version but has the waiting |
145 // version, activates the waiting version and runs |callback| when it is | 150 // version, activates the waiting version and runs |callback| when it is |
146 // activated. | 151 // activated. |
147 // | 152 // |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 | 339 |
335 // The ResourceContext associated with this context. | 340 // The ResourceContext associated with this context. |
336 ResourceContext* resource_context_; | 341 ResourceContext* resource_context_; |
337 | 342 |
338 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper); | 343 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper); |
339 }; | 344 }; |
340 | 345 |
341 } // namespace content | 346 } // namespace content |
342 | 347 |
343 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 348 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
OLD | NEW |