Chromium Code Reviews| 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_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_mojo_event_dispatcher.h" | |
| 23 #include "content/browser/service_worker/service_worker_script_cache_map.h" | 24 #include "content/browser/service_worker/service_worker_script_cache_map.h" |
| 25 #include "content/common/background_sync_service.mojom.h" | |
|
jkarlin
2015/06/18 18:13:56
I don't think you need this one any longer.
iclelland
2015/06/19 13:44:32
You're right; thanks for catching it.
| |
| 24 #include "content/common/content_export.h" | 26 #include "content/common/content_export.h" |
| 25 #include "content/common/service_worker/service_worker_status_code.h" | 27 #include "content/common/service_worker/service_worker_status_code.h" |
| 26 #include "content/common/service_worker/service_worker_types.h" | 28 #include "content/common/service_worker/service_worker_types.h" |
| 27 #include "third_party/WebKit/public/platform/WebGeofencingEventType.h" | 29 #include "third_party/WebKit/public/platform/WebGeofencingEventType.h" |
| 28 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" | 30 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" |
| 29 | 31 |
| 30 // Windows headers will redefine SendMessage. | 32 // Windows headers will redefine SendMessage. |
| 31 #ifdef SendMessage | 33 #ifdef SendMessage |
| 32 #undef SendMessage | 34 #undef SendMessage |
| 33 #endif | 35 #endif |
| 34 | 36 |
| 35 class GURL; | 37 class GURL; |
| 36 | 38 |
| 37 namespace blink { | 39 namespace blink { |
| 38 struct WebCircularGeofencingRegion; | 40 struct WebCircularGeofencingRegion; |
| 39 } | 41 } |
| 40 | 42 |
| 41 namespace net { | 43 namespace net { |
| 42 class HttpResponseInfo; | 44 class HttpResponseInfo; |
| 43 } | 45 } |
| 44 | 46 |
| 45 namespace content { | 47 namespace content { |
| 46 | 48 |
| 47 class EmbeddedWorkerRegistry; | 49 class EmbeddedWorkerRegistry; |
| 48 class ServiceWorkerContextCore; | 50 class ServiceWorkerContextCore; |
| 51 class ServiceWorkerMojoEventDispatcher; | |
| 49 class ServiceWorkerProviderHost; | 52 class ServiceWorkerProviderHost; |
| 50 class ServiceWorkerRegistration; | 53 class ServiceWorkerRegistration; |
| 51 class ServiceWorkerURLRequestJob; | 54 class ServiceWorkerURLRequestJob; |
| 52 struct NavigatorConnectClient; | 55 struct NavigatorConnectClient; |
| 53 struct PlatformNotificationData; | 56 struct PlatformNotificationData; |
| 54 struct ServiceWorkerClientInfo; | 57 struct ServiceWorkerClientInfo; |
| 55 struct ServiceWorkerVersionInfo; | 58 struct ServiceWorkerVersionInfo; |
| 56 struct TransferredMessagePort; | 59 struct TransferredMessagePort; |
| 57 | 60 |
| 58 // This class corresponds to a specific version of a ServiceWorker | 61 // This class corresponds to a specific version of a ServiceWorker |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 409 void OnGetClients(int request_id, | 412 void OnGetClients(int request_id, |
| 410 const ServiceWorkerClientQueryOptions& options); | 413 const ServiceWorkerClientQueryOptions& options); |
| 411 | 414 |
| 412 void OnActivateEventFinished(int request_id, | 415 void OnActivateEventFinished(int request_id, |
| 413 blink::WebServiceWorkerEventResult result); | 416 blink::WebServiceWorkerEventResult result); |
| 414 void OnInstallEventFinished(int request_id, | 417 void OnInstallEventFinished(int request_id, |
| 415 blink::WebServiceWorkerEventResult result); | 418 blink::WebServiceWorkerEventResult result); |
| 416 void OnFetchEventFinished(int request_id, | 419 void OnFetchEventFinished(int request_id, |
| 417 ServiceWorkerFetchEventResult result, | 420 ServiceWorkerFetchEventResult result, |
| 418 const ServiceWorkerResponse& response); | 421 const ServiceWorkerResponse& response); |
| 419 void OnSyncEventFinished(int request_id, | 422 void OnSyncEventFinished(int request_id, ServiceWorkerStatusCode status); |
| 420 blink::WebServiceWorkerEventResult result); | |
| 421 void OnNotificationClickEventFinished(int request_id); | 423 void OnNotificationClickEventFinished(int request_id); |
| 422 void OnPushEventFinished(int request_id, | 424 void OnPushEventFinished(int request_id, |
| 423 blink::WebServiceWorkerEventResult result); | 425 blink::WebServiceWorkerEventResult result); |
| 424 void OnGeofencingEventFinished(int request_id); | 426 void OnGeofencingEventFinished(int request_id); |
| 425 void OnCrossOriginConnectEventFinished(int request_id, | 427 void OnCrossOriginConnectEventFinished(int request_id, |
| 426 bool accept_connection); | 428 bool accept_connection); |
| 427 void OnOpenWindow(int request_id, GURL url); | 429 void OnOpenWindow(int request_id, GURL url); |
| 428 void DidOpenWindow(int request_id, | 430 void DidOpenWindow(int request_id, |
| 429 int render_process_id, | 431 int render_process_id, |
| 430 int render_frame_id); | 432 int render_frame_id); |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 561 | 563 |
| 562 // The status when StartWorker was invoked. Used for UMA. | 564 // The status when StartWorker was invoked. Used for UMA. |
| 563 Status prestart_status_ = NEW; | 565 Status prestart_status_ = NEW; |
| 564 // If not OK, the reason that StartWorker failed. Used for | 566 // If not OK, the reason that StartWorker failed. Used for |
| 565 // running |start_callbacks_|. | 567 // running |start_callbacks_|. |
| 566 ServiceWorkerStatusCode start_worker_status_ = SERVICE_WORKER_OK; | 568 ServiceWorkerStatusCode start_worker_status_ = SERVICE_WORKER_OK; |
| 567 | 569 |
| 568 scoped_ptr<PingController> ping_controller_; | 570 scoped_ptr<PingController> ping_controller_; |
| 569 scoped_ptr<Metrics> metrics_; | 571 scoped_ptr<Metrics> metrics_; |
| 570 | 572 |
| 573 ServiceWorkerMojoEventDispatcher mojo_event_dispatcher_; | |
| 574 | |
| 571 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; | 575 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; |
| 572 | 576 |
| 573 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); | 577 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); |
| 574 }; | 578 }; |
| 575 | 579 |
| 576 } // namespace content | 580 } // namespace content |
| 577 | 581 |
| 578 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 582 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| OLD | NEW |