| 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 class WebServiceWorkerContextProxy; | 29 class WebServiceWorkerContextProxy; |
| 30 } | 30 } |
| 31 | 31 |
| 32 namespace IPC { | 32 namespace IPC { |
| 33 class Message; | 33 class Message; |
| 34 } | 34 } |
| 35 | 35 |
| 36 namespace content { | 36 namespace content { |
| 37 | 37 |
| 38 class EmbeddedWorkerContextClient; | 38 class EmbeddedWorkerContextClient; |
| 39 struct ShowDesktopNotificationHostMsgParams; | 39 struct PlatformNotificationData; |
| 40 | 40 |
| 41 // TODO(kinuko): This should implement WebServiceWorkerContextClient | 41 // TODO(kinuko): This should implement WebServiceWorkerContextClient |
| 42 // rather than having EmbeddedWorkerContextClient implement it. | 42 // rather than having EmbeddedWorkerContextClient implement it. |
| 43 // See the header comment in embedded_worker_context_client.h for the | 43 // See the header comment in embedded_worker_context_client.h for the |
| 44 // potential EW/SW layering concerns. | 44 // potential EW/SW layering concerns. |
| 45 class ServiceWorkerScriptContext { | 45 class ServiceWorkerScriptContext { |
| 46 public: | 46 public: |
| 47 ServiceWorkerScriptContext( | 47 ServiceWorkerScriptContext( |
| 48 EmbeddedWorkerContextClient* embedded_context, | 48 EmbeddedWorkerContextClient* embedded_context, |
| 49 blink::WebServiceWorkerContextProxy* proxy); | 49 blink::WebServiceWorkerContextProxy* proxy); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 typedef IDMap<blink::WebServiceWorkerSkipWaitingCallbacks, IDMapOwnPointer> | 93 typedef IDMap<blink::WebServiceWorkerSkipWaitingCallbacks, IDMapOwnPointer> |
| 94 SkipWaitingCallbacksMap; | 94 SkipWaitingCallbacksMap; |
| 95 | 95 |
| 96 void OnActivateEvent(int request_id); | 96 void OnActivateEvent(int request_id); |
| 97 void OnInstallEvent(int request_id, int active_version_id); | 97 void OnInstallEvent(int request_id, int active_version_id); |
| 98 void OnFetchEvent(int request_id, const ServiceWorkerFetchRequest& request); | 98 void OnFetchEvent(int request_id, const ServiceWorkerFetchRequest& request); |
| 99 void OnSyncEvent(int request_id); | 99 void OnSyncEvent(int request_id); |
| 100 void OnNotificationClickEvent( | 100 void OnNotificationClickEvent( |
| 101 int request_id, | 101 int request_id, |
| 102 const std::string& notification_id, | 102 const std::string& notification_id, |
| 103 const ShowDesktopNotificationHostMsgParams& notification_data); | 103 const PlatformNotificationData& notification_data); |
| 104 void OnPushEvent(int request_id, const std::string& data); | 104 void OnPushEvent(int request_id, const std::string& data); |
| 105 void OnGeofencingEvent(int request_id, | 105 void OnGeofencingEvent(int request_id, |
| 106 blink::WebGeofencingEventType event_type, | 106 blink::WebGeofencingEventType event_type, |
| 107 const std::string& region_id, | 107 const std::string& region_id, |
| 108 const blink::WebCircularGeofencingRegion& region); | 108 const blink::WebCircularGeofencingRegion& region); |
| 109 void OnPostMessage(const base::string16& message, | 109 void OnPostMessage(const base::string16& message, |
| 110 const std::vector<int>& sent_message_port_ids, | 110 const std::vector<int>& sent_message_port_ids, |
| 111 const std::vector<int>& new_routing_ids); | 111 const std::vector<int>& new_routing_ids); |
| 112 void OnDidGetClientDocuments( | 112 void OnDidGetClientDocuments( |
| 113 int request_id, const std::vector<ServiceWorkerClientInfo>& clients); | 113 int request_id, const std::vector<ServiceWorkerClientInfo>& clients); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 142 std::map<int, base::TimeTicks> install_start_timings_; | 142 std::map<int, base::TimeTicks> install_start_timings_; |
| 143 std::map<int, base::TimeTicks> notification_click_start_timings_; | 143 std::map<int, base::TimeTicks> notification_click_start_timings_; |
| 144 std::map<int, base::TimeTicks> push_start_timings_; | 144 std::map<int, base::TimeTicks> push_start_timings_; |
| 145 | 145 |
| 146 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerScriptContext); | 146 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerScriptContext); |
| 147 }; | 147 }; |
| 148 | 148 |
| 149 } // namespace content | 149 } // namespace content |
| 150 | 150 |
| 151 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ | 151 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ |
| OLD | NEW |