Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(768)

Side by Side Diff: content/browser/service_worker/service_worker_version.h

Issue 843583005: [ServiceWorker] Implement WebServiceWorkerContextClient::openWindow(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@content_browser_client_openurl
Patch Set: review comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 void OnFetchEventFinished(int request_id, 351 void OnFetchEventFinished(int request_id,
352 ServiceWorkerFetchEventResult result, 352 ServiceWorkerFetchEventResult result,
353 const ServiceWorkerResponse& response); 353 const ServiceWorkerResponse& response);
354 void OnSyncEventFinished(int request_id); 354 void OnSyncEventFinished(int request_id);
355 void OnNotificationClickEventFinished(int request_id); 355 void OnNotificationClickEventFinished(int request_id);
356 void OnPushEventFinished(int request_id, 356 void OnPushEventFinished(int request_id,
357 blink::WebServiceWorkerEventResult result); 357 blink::WebServiceWorkerEventResult result);
358 void OnGeofencingEventFinished(int request_id); 358 void OnGeofencingEventFinished(int request_id);
359 void OnCrossOriginConnectEventFinished(int request_id, 359 void OnCrossOriginConnectEventFinished(int request_id,
360 bool accept_connection); 360 bool accept_connection);
361 void OnOpenWindow(int request_id, const GURL& url);
362 void DidOpenWindow(int request_id,
363 int render_process_id,
364 int render_frame_id);
365 void OnOpenWindowFinished(int request_id,
366 int client_id,
367 const ServiceWorkerClientInfo& client_info);
368
361 void OnPostMessageToDocument(int client_id, 369 void OnPostMessageToDocument(int client_id,
362 const base::string16& message, 370 const base::string16& message,
363 const std::vector<int>& sent_message_port_ids); 371 const std::vector<int>& sent_message_port_ids);
364 void OnFocusClient(int request_id, int client_id); 372 void OnFocusClient(int request_id, int client_id);
365 void OnSkipWaiting(int request_id); 373 void OnSkipWaiting(int request_id);
366 void OnClaimClients(int request_id); 374 void OnClaimClients(int request_id);
367 375
368 void OnFocusClientFinished(int request_id, bool result); 376 void OnFocusClientFinished(int request_id, bool result);
377
369 void DidSkipWaiting(int request_id); 378 void DidSkipWaiting(int request_id);
370 void DidClaimClients(int request_id, ServiceWorkerStatusCode status); 379 void DidClaimClients(int request_id, ServiceWorkerStatusCode status);
371 void DidGetClientInfo(int client_id, 380 void DidGetClientInfo(int client_id,
372 scoped_refptr<GetClientDocumentsCallback> callback, 381 scoped_refptr<GetClientDocumentsCallback> callback,
373 const ServiceWorkerClientInfo& info); 382 const ServiceWorkerClientInfo& info);
383
374 void ScheduleStopWorker(); 384 void ScheduleStopWorker();
375 void StopWorkerIfIdle(); 385 void StopWorkerIfIdle();
376 bool HasInflightRequests() const; 386 bool HasInflightRequests() const;
377 387
378 void DoomInternal(); 388 void DoomInternal();
379 389
380 template <typename IDMAP> 390 template <typename IDMAP>
381 void RemoveCallbackAndStopIfDoomed(IDMAP* callbacks, int request_id); 391 void RemoveCallbackAndStopIfDoomed(IDMAP* callbacks, int request_id);
382 392
383 const int64 version_id_; 393 const int64 version_id_;
(...skipping 16 matching lines...) Expand all
400 IDMap<StatusCallback, IDMapOwnPointer> notification_click_callbacks_; 410 IDMap<StatusCallback, IDMapOwnPointer> notification_click_callbacks_;
401 IDMap<StatusCallback, IDMapOwnPointer> push_callbacks_; 411 IDMap<StatusCallback, IDMapOwnPointer> push_callbacks_;
402 IDMap<StatusCallback, IDMapOwnPointer> geofencing_callbacks_; 412 IDMap<StatusCallback, IDMapOwnPointer> geofencing_callbacks_;
403 IDMap<CrossOriginConnectCallback, IDMapOwnPointer> 413 IDMap<CrossOriginConnectCallback, IDMapOwnPointer>
404 cross_origin_connect_callbacks_; 414 cross_origin_connect_callbacks_;
405 415
406 std::set<const ServiceWorkerURLRequestJob*> streaming_url_request_jobs_; 416 std::set<const ServiceWorkerURLRequestJob*> streaming_url_request_jobs_;
407 417
408 ControlleeMap controllee_map_; 418 ControlleeMap controllee_map_;
409 ControlleeByIDMap controllee_by_id_; 419 ControlleeByIDMap controllee_by_id_;
420 // Will be null while shutting down.
410 base::WeakPtr<ServiceWorkerContextCore> context_; 421 base::WeakPtr<ServiceWorkerContextCore> context_;
411 ObserverList<Listener> listeners_; 422 ObserverList<Listener> listeners_;
412 ServiceWorkerScriptCacheMap script_cache_map_; 423 ServiceWorkerScriptCacheMap script_cache_map_;
413 base::OneShotTimer<ServiceWorkerVersion> stop_worker_timer_; 424 base::OneShotTimer<ServiceWorkerVersion> stop_worker_timer_;
414 base::OneShotTimer<ServiceWorkerVersion> update_timer_; 425 base::OneShotTimer<ServiceWorkerVersion> update_timer_;
415 bool is_doomed_; 426 bool is_doomed_;
416 std::vector<int> pending_skip_waiting_requests_; 427 std::vector<int> pending_skip_waiting_requests_;
417 bool skip_waiting_; 428 bool skip_waiting_;
418 scoped_ptr<net::HttpResponseInfo> main_script_http_info_; 429 scoped_ptr<net::HttpResponseInfo> main_script_http_info_;
419 430
420 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; 431 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_;
421 432
422 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); 433 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion);
423 }; 434 };
424 435
425 } // namespace content 436 } // namespace content
426 437
427 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 438 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698