| 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_SCRIPT_CONTEXT_H_ | 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ |
| 6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ | 6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 struct WebCrossOriginServiceWorkerClient; | 29 struct WebCrossOriginServiceWorkerClient; |
| 30 class WebServiceWorkerContextProxy; | 30 class WebServiceWorkerContextProxy; |
| 31 } | 31 } |
| 32 | 32 |
| 33 namespace IPC { | 33 namespace IPC { |
| 34 class Message; | 34 class Message; |
| 35 } | 35 } |
| 36 | 36 |
| 37 namespace content { | 37 namespace content { |
| 38 | 38 |
| 39 struct CrossOriginServiceWorkerClient; | 39 struct NavigatorConnectClient; |
| 40 class EmbeddedWorkerContextClient; | 40 class EmbeddedWorkerContextClient; |
| 41 struct PlatformNotificationData; | 41 struct PlatformNotificationData; |
| 42 | 42 |
| 43 // TODO(kinuko): This should implement WebServiceWorkerContextClient | 43 // TODO(kinuko): This should implement WebServiceWorkerContextClient |
| 44 // rather than having EmbeddedWorkerContextClient implement it. | 44 // rather than having EmbeddedWorkerContextClient implement it. |
| 45 // See the header comment in embedded_worker_context_client.h for the | 45 // See the header comment in embedded_worker_context_client.h for the |
| 46 // potential EW/SW layering concerns. | 46 // potential EW/SW layering concerns. |
| 47 class ServiceWorkerScriptContext { | 47 class ServiceWorkerScriptContext { |
| 48 public: | 48 public: |
| 49 ServiceWorkerScriptContext( | 49 ServiceWorkerScriptContext( |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 void OnNotificationClickEvent( | 107 void OnNotificationClickEvent( |
| 108 int request_id, | 108 int request_id, |
| 109 const std::string& notification_id, | 109 const std::string& notification_id, |
| 110 const PlatformNotificationData& notification_data); | 110 const PlatformNotificationData& notification_data); |
| 111 void OnPushEvent(int request_id, const std::string& data); | 111 void OnPushEvent(int request_id, const std::string& data); |
| 112 void OnGeofencingEvent(int request_id, | 112 void OnGeofencingEvent(int request_id, |
| 113 blink::WebGeofencingEventType event_type, | 113 blink::WebGeofencingEventType event_type, |
| 114 const std::string& region_id, | 114 const std::string& region_id, |
| 115 const blink::WebCircularGeofencingRegion& region); | 115 const blink::WebCircularGeofencingRegion& region); |
| 116 void OnCrossOriginConnectEvent(int request_id, | 116 void OnCrossOriginConnectEvent(int request_id, |
| 117 const CrossOriginServiceWorkerClient& client); | 117 const NavigatorConnectClient& client); |
| 118 void OnPostMessage(const base::string16& message, | 118 void OnPostMessage(const base::string16& message, |
| 119 const std::vector<int>& sent_message_port_ids, | 119 const std::vector<int>& sent_message_port_ids, |
| 120 const std::vector<int>& new_routing_ids); | 120 const std::vector<int>& new_routing_ids); |
| 121 void OnCrossOriginMessageToWorker( | 121 void OnCrossOriginMessageToWorker( |
| 122 const CrossOriginServiceWorkerClient& client, | 122 const NavigatorConnectClient& client, |
| 123 const base::string16& message, | 123 const base::string16& message, |
| 124 const std::vector<int>& sent_message_port_ids, | 124 const std::vector<int>& sent_message_port_ids, |
| 125 const std::vector<int>& new_routing_ids); | 125 const std::vector<int>& new_routing_ids); |
| 126 void OnDidGetClientDocuments( | 126 void OnDidGetClientDocuments( |
| 127 int request_id, const std::vector<ServiceWorkerClientInfo>& clients); | 127 int request_id, const std::vector<ServiceWorkerClientInfo>& clients); |
| 128 void OnFocusClientResponse(int request_id, bool result); | 128 void OnFocusClientResponse(int request_id, bool result); |
| 129 void OnDidSkipWaiting(int request_id); | 129 void OnDidSkipWaiting(int request_id); |
| 130 | 130 |
| 131 scoped_ptr<ServiceWorkerCacheStorageDispatcher> cache_storage_dispatcher_; | 131 scoped_ptr<ServiceWorkerCacheStorageDispatcher> cache_storage_dispatcher_; |
| 132 | 132 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 156 std::map<int, base::TimeTicks> install_start_timings_; | 156 std::map<int, base::TimeTicks> install_start_timings_; |
| 157 std::map<int, base::TimeTicks> notification_click_start_timings_; | 157 std::map<int, base::TimeTicks> notification_click_start_timings_; |
| 158 std::map<int, base::TimeTicks> push_start_timings_; | 158 std::map<int, base::TimeTicks> push_start_timings_; |
| 159 | 159 |
| 160 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerScriptContext); | 160 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerScriptContext); |
| 161 }; | 161 }; |
| 162 | 162 |
| 163 } // namespace content | 163 } // namespace content |
| 164 | 164 |
| 165 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ | 165 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ |
| OLD | NEW |