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