| 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 <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 163 |
| 164 private: | 164 private: |
| 165 struct WorkerContextData; | 165 struct WorkerContextData; |
| 166 | 166 |
| 167 // Get routing_id for sending message to the ServiceWorkerVersion | 167 // Get routing_id for sending message to the ServiceWorkerVersion |
| 168 // in the browser process. | 168 // in the browser process. |
| 169 int GetRoutingID() const { return embedded_worker_id_; } | 169 int GetRoutingID() const { return embedded_worker_id_; } |
| 170 | 170 |
| 171 void Send(IPC::Message* message); | 171 void Send(IPC::Message* message); |
| 172 void SendWorkerStarted(); | 172 void SendWorkerStarted(); |
| 173 void SetRegistrationInServiceWorkerGlobalScope(); | 173 void SetRegistrationInServiceWorkerGlobalScope( |
| 174 const ServiceWorkerRegistrationObjectInfo& info, |
| 175 const ServiceWorkerVersionAttributes& attrs); |
| 174 | 176 |
| 175 void OnActivateEvent(int request_id); | 177 void OnActivateEvent(int request_id); |
| 176 void OnInstallEvent(int request_id); | 178 void OnInstallEvent(int request_id); |
| 177 void OnFetchEvent(int request_id, const ServiceWorkerFetchRequest& request); | 179 void OnFetchEvent(int request_id, const ServiceWorkerFetchRequest& request); |
| 178 void OnNotificationClickEvent( | 180 void OnNotificationClickEvent( |
| 179 int request_id, | 181 int request_id, |
| 180 int64_t persistent_notification_id, | 182 int64_t persistent_notification_id, |
| 181 const PlatformNotificationData& notification_data, | 183 const PlatformNotificationData& notification_data, |
| 182 int action_index); | 184 int action_index); |
| 183 void OnPushEvent(int request_id, const std::string& data); | 185 void OnPushEvent(int request_id, const std::string& data); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 // Initialized on the worker thread in workerContextStarted and | 237 // Initialized on the worker thread in workerContextStarted and |
| 236 // destructed on the worker thread in willDestroyWorkerContext. | 238 // destructed on the worker thread in willDestroyWorkerContext. |
| 237 scoped_ptr<WorkerContextData> context_; | 239 scoped_ptr<WorkerContextData> context_; |
| 238 | 240 |
| 239 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); | 241 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); |
| 240 }; | 242 }; |
| 241 | 243 |
| 242 } // namespace content | 244 } // namespace content |
| 243 | 245 |
| 244 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 246 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ |
| OLD | NEW |