| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 const std::string& key, | 165 const std::string& key, |
| 166 const StatusCallback& callback); | 166 const StatusCallback& callback); |
| 167 void GetUserDataForAllRegistrations( | 167 void GetUserDataForAllRegistrations( |
| 168 const std::string& key, | 168 const std::string& key, |
| 169 const GetUserDataForAllRegistrationsCallback& callback); | 169 const GetUserDataForAllRegistrationsCallback& callback); |
| 170 | 170 |
| 171 // This function can be called from any thread, but the callback will always | 171 // This function can be called from any thread, but the callback will always |
| 172 // be called on the UI thread. | 172 // be called on the UI thread. |
| 173 void StartServiceWorker(const GURL& pattern, const StatusCallback& callback); | 173 void StartServiceWorker(const GURL& pattern, const StatusCallback& callback); |
| 174 | 174 |
| 175 // This function can be called from any thread. |
| 176 void SkipWaitingWorker(const GURL& pattern); |
| 177 |
| 175 // These methods can be called from any thread. | 178 // These methods can be called from any thread. |
| 176 void UpdateRegistration(const GURL& pattern); | 179 void UpdateRegistration(const GURL& pattern); |
| 177 void SetForceUpdateOnPageLoad(bool force_update_on_page_load); | 180 void SetForceUpdateOnPageLoad(bool force_update_on_page_load); |
| 178 void AddObserver(ServiceWorkerContextObserver* observer); | 181 void AddObserver(ServiceWorkerContextObserver* observer); |
| 179 void RemoveObserver(ServiceWorkerContextObserver* observer); | 182 void RemoveObserver(ServiceWorkerContextObserver* observer); |
| 180 | 183 |
| 181 bool is_incognito() const { return is_incognito_; } | 184 bool is_incognito() const { return is_incognito_; } |
| 182 | 185 |
| 183 // Must be called from the IO thread. | 186 // Must be called from the IO thread. |
| 184 bool OriginHasForeignFetchRegistrations(const GURL& origin); | 187 bool OriginHasForeignFetchRegistrations(const GURL& origin); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 ResourceContext* resource_context_; | 252 ResourceContext* resource_context_; |
| 250 | 253 |
| 251 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; | 254 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; |
| 252 | 255 |
| 253 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper); | 256 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper); |
| 254 }; | 257 }; |
| 255 | 258 |
| 256 } // namespace content | 259 } // namespace content |
| 257 | 260 |
| 258 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 261 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
| OLD | NEW |