| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 void OnFetchEventFinished(int request_id, | 340 void OnFetchEventFinished(int request_id, |
| 341 ServiceWorkerFetchEventResult result, | 341 ServiceWorkerFetchEventResult result, |
| 342 const ServiceWorkerResponse& response); | 342 const ServiceWorkerResponse& response); |
| 343 void OnSyncEventFinished(int request_id); | 343 void OnSyncEventFinished(int request_id); |
| 344 void OnNotificationClickEventFinished(int request_id); | 344 void OnNotificationClickEventFinished(int request_id); |
| 345 void OnPushEventFinished(int request_id, | 345 void OnPushEventFinished(int request_id, |
| 346 blink::WebServiceWorkerEventResult result); | 346 blink::WebServiceWorkerEventResult result); |
| 347 void OnGeofencingEventFinished(int request_id); | 347 void OnGeofencingEventFinished(int request_id); |
| 348 void OnCrossOriginConnectEventFinished(int request_id, | 348 void OnCrossOriginConnectEventFinished(int request_id, |
| 349 bool accept_connection); | 349 bool accept_connection); |
| 350 void OnOpenWindow(int request_id, const GURL& url); |
| 351 void DidOpenWindow(int request_id, |
| 352 int render_process_id, |
| 353 int render_frame_id); |
| 354 void OnOpenWindowFinished(int request_id, |
| 355 int client_id, |
| 356 const ServiceWorkerClientInfo& client_info); |
| 357 |
| 350 void OnPostMessageToDocument(int client_id, | 358 void OnPostMessageToDocument(int client_id, |
| 351 const base::string16& message, | 359 const base::string16& message, |
| 352 const std::vector<int>& sent_message_port_ids); | 360 const std::vector<int>& sent_message_port_ids); |
| 353 void OnFocusClient(int request_id, int client_id); | 361 void OnFocusClient(int request_id, int client_id); |
| 354 void OnSkipWaiting(int request_id); | 362 void OnSkipWaiting(int request_id); |
| 363 void OnFocusClientFinished(int request_id, bool result); |
| 355 | 364 |
| 356 void OnFocusClientFinished(int request_id, bool result); | |
| 357 void DidSkipWaiting(int request_id); | 365 void DidSkipWaiting(int request_id); |
| 358 void DidGetClientInfo(int client_id, | 366 void DidGetClientInfo(int client_id, |
| 359 scoped_refptr<GetClientDocumentsCallback> callback, | 367 scoped_refptr<GetClientDocumentsCallback> callback, |
| 360 const ServiceWorkerClientInfo& info); | 368 const ServiceWorkerClientInfo& info); |
| 369 |
| 361 void ScheduleStopWorker(); | 370 void ScheduleStopWorker(); |
| 362 void StopWorkerIfIdle(); | 371 void StopWorkerIfIdle(); |
| 363 bool HasInflightRequests() const; | 372 bool HasInflightRequests() const; |
| 364 | 373 |
| 365 void DoomInternal(); | 374 void DoomInternal(); |
| 366 | 375 |
| 367 template <typename IDMAP> | 376 template <typename IDMAP> |
| 368 void RemoveCallbackAndStopIfDoomed(IDMAP* callbacks, int request_id); | 377 void RemoveCallbackAndStopIfDoomed(IDMAP* callbacks, int request_id); |
| 369 | 378 |
| 370 const int64 version_id_; | 379 const int64 version_id_; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 387 IDMap<StatusCallback, IDMapOwnPointer> notification_click_callbacks_; | 396 IDMap<StatusCallback, IDMapOwnPointer> notification_click_callbacks_; |
| 388 IDMap<StatusCallback, IDMapOwnPointer> push_callbacks_; | 397 IDMap<StatusCallback, IDMapOwnPointer> push_callbacks_; |
| 389 IDMap<StatusCallback, IDMapOwnPointer> geofencing_callbacks_; | 398 IDMap<StatusCallback, IDMapOwnPointer> geofencing_callbacks_; |
| 390 IDMap<CrossOriginConnectCallback, IDMapOwnPointer> | 399 IDMap<CrossOriginConnectCallback, IDMapOwnPointer> |
| 391 cross_origin_connect_callbacks_; | 400 cross_origin_connect_callbacks_; |
| 392 | 401 |
| 393 std::set<const ServiceWorkerURLRequestJob*> streaming_url_request_jobs_; | 402 std::set<const ServiceWorkerURLRequestJob*> streaming_url_request_jobs_; |
| 394 | 403 |
| 395 ControlleeMap controllee_map_; | 404 ControlleeMap controllee_map_; |
| 396 ControlleeByIDMap controllee_by_id_; | 405 ControlleeByIDMap controllee_by_id_; |
| 406 // Will be null while shutting down. |
| 397 base::WeakPtr<ServiceWorkerContextCore> context_; | 407 base::WeakPtr<ServiceWorkerContextCore> context_; |
| 398 ObserverList<Listener> listeners_; | 408 ObserverList<Listener> listeners_; |
| 399 ServiceWorkerScriptCacheMap script_cache_map_; | 409 ServiceWorkerScriptCacheMap script_cache_map_; |
| 400 base::OneShotTimer<ServiceWorkerVersion> stop_worker_timer_; | 410 base::OneShotTimer<ServiceWorkerVersion> stop_worker_timer_; |
| 401 base::OneShotTimer<ServiceWorkerVersion> update_timer_; | 411 base::OneShotTimer<ServiceWorkerVersion> update_timer_; |
| 402 bool is_doomed_; | 412 bool is_doomed_; |
| 403 std::vector<int> pending_skip_waiting_requests_; | 413 std::vector<int> pending_skip_waiting_requests_; |
| 404 bool skip_waiting_; | 414 bool skip_waiting_; |
| 405 | 415 |
| 406 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; | 416 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; |
| 407 | 417 |
| 408 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); | 418 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); |
| 409 }; | 419 }; |
| 410 | 420 |
| 411 } // namespace content | 421 } // namespace content |
| 412 | 422 |
| 413 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 423 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| OLD | NEW |