Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Side by Side Diff: content/browser/service_worker/service_worker_context_wrapper.h

Issue 2751343002: Adds a basic offline check to InstallableManager. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 // ServiceWorkerContext implementation: 94 // ServiceWorkerContext implementation:
95 void RegisterServiceWorker(const GURL& pattern, 95 void RegisterServiceWorker(const GURL& pattern,
96 const GURL& script_url, 96 const GURL& script_url,
97 const ResultCallback& continuation) override; 97 const ResultCallback& continuation) override;
98 void UnregisterServiceWorker(const GURL& pattern, 98 void UnregisterServiceWorker(const GURL& pattern,
99 const ResultCallback& continuation) override; 99 const ResultCallback& continuation) override;
100 void GetAllOriginsInfo(const GetUsageInfoCallback& callback) override; 100 void GetAllOriginsInfo(const GetUsageInfoCallback& callback) override;
101 void DeleteForOrigin(const GURL& origin, 101 void DeleteForOrigin(const GURL& origin,
102 const ResultCallback& callback) override; 102 const ResultCallback& callback) override;
103 void CheckHasServiceWorker( 103 void CheckServiceWorkerStatus(
104 const GURL& url, 104 const GURL& url,
105 const GURL& other_url, 105 const GURL& other_url,
106 const CheckHasServiceWorkerCallback& callback) override; 106 const CheckServiceWorkerStatusCallback& callback) override;
107 void CountExternalRequestsForTest( 107 void CountExternalRequestsForTest(
108 const GURL& url, 108 const GURL& url,
109 const CountExternalRequestsCallback& callback) override; 109 const CountExternalRequestsCallback& callback) override;
110 void StopAllServiceWorkersForOrigin(const GURL& origin) override; 110 void StopAllServiceWorkersForOrigin(const GURL& origin) override;
111 void ClearAllServiceWorkersForTest(const base::Closure& callback) override; 111 void ClearAllServiceWorkersForTest(const base::Closure& callback) override;
112 void StartServiceWorkerForNavigationHint( 112 void StartServiceWorkerForNavigationHint(
113 const GURL& document_url, 113 const GURL& document_url,
114 blink::WebNavigationHintType type, 114 blink::WebNavigationHintType type,
115 int render_process_id, 115 int render_process_id,
116 const ResultCallback& callback) override; 116 const ResultCallback& callback) override;
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 const FindRegistrationCallback& callback, 262 const FindRegistrationCallback& callback,
263 scoped_refptr<ServiceWorkerRegistration> registration); 263 scoped_refptr<ServiceWorkerRegistration> registration);
264 264
265 void DidDeleteAndStartOver(ServiceWorkerStatusCode status); 265 void DidDeleteAndStartOver(ServiceWorkerStatusCode status);
266 266
267 void DidGetAllRegistrationsForGetAllOrigins( 267 void DidGetAllRegistrationsForGetAllOrigins(
268 const GetUsageInfoCallback& callback, 268 const GetUsageInfoCallback& callback,
269 ServiceWorkerStatusCode status, 269 ServiceWorkerStatusCode status,
270 const std::vector<ServiceWorkerRegistrationInfo>& registrations); 270 const std::vector<ServiceWorkerRegistrationInfo>& registrations);
271 271
272 void DidCheckHasServiceWorker(const CheckHasServiceWorkerCallback& callback, 272 void DidCheckServiceWorkerStatus(
273 bool has_service_worker); 273 const CheckServiceWorkerStatusCallback& callback,
274 content::ServiceWorkerStatus sw_status);
274 275
275 void DidFindRegistrationForUpdate( 276 void DidFindRegistrationForUpdate(
276 ServiceWorkerStatusCode status, 277 ServiceWorkerStatusCode status,
277 scoped_refptr<content::ServiceWorkerRegistration> registration); 278 scoped_refptr<content::ServiceWorkerRegistration> registration);
278 279
279 void DidCheckRenderProcessForNavigationHint(const GURL& document_url, 280 void DidCheckRenderProcessForNavigationHint(const GURL& document_url,
280 blink::WebNavigationHintType type, 281 blink::WebNavigationHintType type,
281 int render_process_id, 282 int render_process_id,
282 const ResultCallback& callback); 283 const ResultCallback& callback);
283 284
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 319
319 // Must be touched on the UI thread. 320 // Must be touched on the UI thread.
320 std::map<int, int> navigation_hint_task_count_per_process_; 321 std::map<int, int> navigation_hint_task_count_per_process_;
321 322
322 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper); 323 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper);
323 }; 324 };
324 325
325 } // namespace content 326 } // namespace content
326 327
327 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ 328 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698