| OLD | NEW | 
|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 
| 6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 
| 7 | 7 | 
| 8 #include <stddef.h> | 8 #include <stddef.h> | 
| 9 #include <stdint.h> | 9 #include <stdint.h> | 
| 10 | 10 | 
| 11 #include <map> | 11 #include <map> | 
| 12 #include <memory> | 12 #include <memory> | 
| 13 #include <string> | 13 #include <string> | 
| 14 #include <vector> | 14 #include <vector> | 
| 15 | 15 | 
| 16 #include "base/id_map.h" | 16 #include "base/id_map.h" | 
| 17 #include "base/macros.h" | 17 #include "base/macros.h" | 
| 18 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" | 
| 19 #include "base/strings/string16.h" | 19 #include "base/strings/string16.h" | 
| 20 #include "base/time/time.h" | 20 #include "base/time/time.h" | 
| 21 #include "content/child/webmessageportchannel_impl.h" | 21 #include "content/child/webmessageportchannel_impl.h" | 
| 22 #include "content/common/service_worker/service_worker_types.h" | 22 #include "content/common/service_worker/service_worker_types.h" | 
| 23 #include "ipc/ipc_listener.h" | 23 #include "ipc/ipc_listener.h" | 
| 24 #include "services/shell/public/interfaces/interface_provider.mojom.h" | 24 #include "services/shell/public/interfaces/interface_provider.mojom.h" | 
| 25 #include "third_party/WebKit/public/platform/WebGeofencingEventType.h" |  | 
| 26 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h" | 25 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h" | 
| 27 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
     kerError.h" | 26 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
     kerError.h" | 
| 28 #include "third_party/WebKit/public/platform/modules/serviceworker/service_worke
     r_event_status.mojom.h" | 27 #include "third_party/WebKit/public/platform/modules/serviceworker/service_worke
     r_event_status.mojom.h" | 
| 29 #include "third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerCo
     ntextClient.h" | 28 #include "third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerCo
     ntextClient.h" | 
| 30 #include "third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerCo
     ntextProxy.h" | 29 #include "third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerCo
     ntextProxy.h" | 
| 31 #include "v8/include/v8.h" | 30 #include "v8/include/v8.h" | 
| 32 | 31 | 
| 33 struct ServiceWorkerMsg_ExtendableMessageEvent_Params; | 32 struct ServiceWorkerMsg_ExtendableMessageEvent_Params; | 
| 34 | 33 | 
| 35 namespace base { | 34 namespace base { | 
| 36 class SingleThreadTaskRunner; | 35 class SingleThreadTaskRunner; | 
| 37 class TaskRunner; | 36 class TaskRunner; | 
| 38 } | 37 } | 
| 39 | 38 | 
| 40 namespace blink { | 39 namespace blink { | 
| 41 struct WebCircularGeofencingRegion; |  | 
| 42 class WebDataSource; | 40 class WebDataSource; | 
| 43 struct WebServiceWorkerClientQueryOptions; | 41 struct WebServiceWorkerClientQueryOptions; | 
| 44 class WebServiceWorkerContextProxy; | 42 class WebServiceWorkerContextProxy; | 
| 45 class WebServiceWorkerProvider; | 43 class WebServiceWorkerProvider; | 
| 46 struct WebSyncRegistration; | 44 struct WebSyncRegistration; | 
| 47 } | 45 } | 
| 48 | 46 | 
| 49 namespace IPC { | 47 namespace IPC { | 
| 50 class Message; | 48 class Message; | 
| 51 } | 49 } | 
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 202   void OnNotificationClickEvent( | 200   void OnNotificationClickEvent( | 
| 203       int request_id, | 201       int request_id, | 
| 204       int64_t persistent_notification_id, | 202       int64_t persistent_notification_id, | 
| 205       const PlatformNotificationData& notification_data, | 203       const PlatformNotificationData& notification_data, | 
| 206       int action_index); | 204       int action_index); | 
| 207   void OnPushEvent(int request_id, const PushEventPayload& payload); | 205   void OnPushEvent(int request_id, const PushEventPayload& payload); | 
| 208   void OnNotificationCloseEvent( | 206   void OnNotificationCloseEvent( | 
| 209       int request_id, | 207       int request_id, | 
| 210       int64_t persistent_notification_id, | 208       int64_t persistent_notification_id, | 
| 211       const PlatformNotificationData& notification_data); | 209       const PlatformNotificationData& notification_data); | 
| 212   void OnGeofencingEvent(int request_id, |  | 
| 213                          blink::WebGeofencingEventType event_type, |  | 
| 214                          const std::string& region_id, |  | 
| 215                          const blink::WebCircularGeofencingRegion& region); |  | 
| 216 | 210 | 
| 217   void OnDidGetClient(int request_id, const ServiceWorkerClientInfo& client); | 211   void OnDidGetClient(int request_id, const ServiceWorkerClientInfo& client); | 
| 218   void OnDidGetClients( | 212   void OnDidGetClients( | 
| 219       int request_id, const std::vector<ServiceWorkerClientInfo>& clients); | 213       int request_id, const std::vector<ServiceWorkerClientInfo>& clients); | 
| 220   void OnOpenWindowResponse(int request_id, | 214   void OnOpenWindowResponse(int request_id, | 
| 221                             const ServiceWorkerClientInfo& client); | 215                             const ServiceWorkerClientInfo& client); | 
| 222   void OnOpenWindowError(int request_id, const std::string& message); | 216   void OnOpenWindowError(int request_id, const std::string& message); | 
| 223   void OnFocusClientResponse(int request_id, | 217   void OnFocusClientResponse(int request_id, | 
| 224                              const ServiceWorkerClientInfo& client); | 218                              const ServiceWorkerClientInfo& client); | 
| 225   void OnNavigateClientResponse(int request_id, | 219   void OnNavigateClientResponse(int request_id, | 
| (...skipping 25 matching lines...) Expand all  Loading... | 
| 251   // Initialized on the worker thread in workerContextStarted and | 245   // Initialized on the worker thread in workerContextStarted and | 
| 252   // destructed on the worker thread in willDestroyWorkerContext. | 246   // destructed on the worker thread in willDestroyWorkerContext. | 
| 253   std::unique_ptr<WorkerContextData> context_; | 247   std::unique_ptr<WorkerContextData> context_; | 
| 254 | 248 | 
| 255   DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); | 249   DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); | 
| 256 }; | 250 }; | 
| 257 | 251 | 
| 258 }  // namespace content | 252 }  // namespace content | 
| 259 | 253 | 
| 260 #endif  // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 254 #endif  // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 
| OLD | NEW | 
|---|