| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 // version, returns ERROR_NOT_FOUND. | 137 // version, returns ERROR_NOT_FOUND. |
| 138 // - If the registration does not have the active version but has the waiting | 138 // - If the registration does not have the active version but has the waiting |
| 139 // version, activates the waiting version and runs |callback| when it is | 139 // version, activates the waiting version and runs |callback| when it is |
| 140 // activated. | 140 // activated. |
| 141 // | 141 // |
| 142 // Must be called from the IO thread. | 142 // Must be called from the IO thread. |
| 143 void FindReadyRegistrationForDocument( | 143 void FindReadyRegistrationForDocument( |
| 144 const GURL& document_url, | 144 const GURL& document_url, |
| 145 const FindRegistrationCallback& callback); | 145 const FindRegistrationCallback& callback); |
| 146 | 146 |
| 147 // Returns the registration for |scope|. It is guaranteed that the returned |
| 148 // registration has the activated worker. |
| 149 // |
| 150 // - If the registration is not found, returns ERROR_NOT_FOUND. |
| 151 // - If the registration has neither the waiting version nor the active |
| 152 // version, returns ERROR_NOT_FOUND. |
| 153 // - If the registration does not have the active version but has the waiting |
| 154 // version, activates the waiting version and runs |callback| when it is |
| 155 // activated. |
| 156 // |
| 157 // Must be called from the IO thread. |
| 158 void FindReadyRegistrationForPattern( |
| 159 const GURL& scope, |
| 160 const FindRegistrationCallback& callback); |
| 161 |
| 147 // Returns the registration for |registration_id|. It is guaranteed that the | 162 // Returns the registration for |registration_id|. It is guaranteed that the |
| 148 // returned registration has the activated worker. | 163 // returned registration has the activated worker. |
| 149 // | 164 // |
| 150 // - If the registration is not found, returns ERROR_NOT_FOUND. | 165 // - If the registration is not found, returns ERROR_NOT_FOUND. |
| 151 // - If the registration has neither the waiting version nor the active | 166 // - If the registration has neither the waiting version nor the active |
| 152 // version, returns ERROR_NOT_FOUND. | 167 // version, returns ERROR_NOT_FOUND. |
| 153 // - If the registration does not have the active version but has the waiting | 168 // - If the registration does not have the active version but has the waiting |
| 154 // version, activates the waiting version and runs |callback| when it is | 169 // version, activates the waiting version and runs |callback| when it is |
| 155 // activated. | 170 // activated. |
| 156 // | 171 // |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 | 299 |
| 285 // Must be touched on the UI thread. | 300 // Must be touched on the UI thread. |
| 286 std::map<int, int> navigation_hint_task_count_per_process_; | 301 std::map<int, int> navigation_hint_task_count_per_process_; |
| 287 | 302 |
| 288 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper); | 303 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper); |
| 289 }; | 304 }; |
| 290 | 305 |
| 291 } // namespace content | 306 } // namespace content |
| 292 | 307 |
| 293 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 308 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
| OLD | NEW |