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

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

Issue 1220943003: [Background Sync] Use Mojo IPC to fire background sync events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mek
Patch Set: Rebase after cr/1221503003 landed Created 5 years, 5 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_VERSION_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/basictypes.h" 14 #include "base/basictypes.h"
15 #include "base/callback.h" 15 #include "base/callback.h"
16 #include "base/gtest_prod_util.h" 16 #include "base/gtest_prod_util.h"
17 #include "base/id_map.h" 17 #include "base/id_map.h"
18 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
19 #include "base/memory/scoped_ptr.h" 19 #include "base/memory/scoped_ptr.h"
20 #include "base/observer_list.h" 20 #include "base/observer_list.h"
21 #include "base/timer/timer.h" 21 #include "base/timer/timer.h"
22 #include "content/browser/service_worker/embedded_worker_instance.h" 22 #include "content/browser/service_worker/embedded_worker_instance.h"
23 #include "content/browser/service_worker/service_worker_script_cache_map.h" 23 #include "content/browser/service_worker/service_worker_script_cache_map.h"
24 #include "content/common/background_sync_service.mojom.h"
24 #include "content/common/content_export.h" 25 #include "content/common/content_export.h"
25 #include "content/common/service_worker/service_worker_status_code.h" 26 #include "content/common/service_worker/service_worker_status_code.h"
26 #include "content/common/service_worker/service_worker_types.h" 27 #include "content/common/service_worker/service_worker_types.h"
27 #include "third_party/WebKit/public/platform/WebGeofencingEventType.h" 28 #include "third_party/WebKit/public/platform/WebGeofencingEventType.h"
28 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" 29 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h"
29 30
30 // Windows headers will redefine SendMessage. 31 // Windows headers will redefine SendMessage.
31 #ifdef SendMessage 32 #ifdef SendMessage
32 #undef SendMessage 33 #undef SendMessage
33 #endif 34 #endif
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 void OnGetClients(int request_id, 426 void OnGetClients(int request_id,
426 const ServiceWorkerClientQueryOptions& options); 427 const ServiceWorkerClientQueryOptions& options);
427 428
428 void OnActivateEventFinished(int request_id, 429 void OnActivateEventFinished(int request_id,
429 blink::WebServiceWorkerEventResult result); 430 blink::WebServiceWorkerEventResult result);
430 void OnInstallEventFinished(int request_id, 431 void OnInstallEventFinished(int request_id,
431 blink::WebServiceWorkerEventResult result); 432 blink::WebServiceWorkerEventResult result);
432 void OnFetchEventFinished(int request_id, 433 void OnFetchEventFinished(int request_id,
433 ServiceWorkerFetchEventResult result, 434 ServiceWorkerFetchEventResult result,
434 const ServiceWorkerResponse& response); 435 const ServiceWorkerResponse& response);
435 void OnSyncEventFinished(int request_id, 436 void OnSyncEventFinished(int request_id, ServiceWorkerEventStatus status);
436 blink::WebServiceWorkerEventResult result);
437 void OnNotificationClickEventFinished(int request_id); 437 void OnNotificationClickEventFinished(int request_id);
438 void OnPushEventFinished(int request_id, 438 void OnPushEventFinished(int request_id,
439 blink::WebServiceWorkerEventResult result); 439 blink::WebServiceWorkerEventResult result);
440 void OnGeofencingEventFinished(int request_id); 440 void OnGeofencingEventFinished(int request_id);
441 void OnCrossOriginConnectEventFinished(int request_id, 441 void OnCrossOriginConnectEventFinished(int request_id,
442 bool accept_connection); 442 bool accept_connection);
443 void OnOpenWindow(int request_id, GURL url); 443 void OnOpenWindow(int request_id, GURL url);
444 void DidOpenWindow(int request_id, 444 void DidOpenWindow(int request_id,
445 int render_process_id, 445 int render_process_id,
446 int render_frame_id); 446 int render_frame_id);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 595
596 // The status when StartWorker was invoked. Used for UMA. 596 // The status when StartWorker was invoked. Used for UMA.
597 Status prestart_status_ = NEW; 597 Status prestart_status_ = NEW;
598 // If not OK, the reason that StartWorker failed. Used for 598 // If not OK, the reason that StartWorker failed. Used for
599 // running |start_callbacks_|. 599 // running |start_callbacks_|.
600 ServiceWorkerStatusCode start_worker_status_ = SERVICE_WORKER_OK; 600 ServiceWorkerStatusCode start_worker_status_ = SERVICE_WORKER_OK;
601 601
602 scoped_ptr<PingController> ping_controller_; 602 scoped_ptr<PingController> ping_controller_;
603 scoped_ptr<Metrics> metrics_; 603 scoped_ptr<Metrics> metrics_;
604 604
605 BackgroundSyncServiceClientPtr background_sync_dispatcher_;
606
605 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; 607 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_;
606 608
607 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); 609 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion);
608 }; 610 };
609 611
610 } // namespace content 612 } // namespace content
611 613
612 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 614 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698