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

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

Issue 1050733002: ServiceWorker: Clean up ServiceWorkerVersion::OnGetClients (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 371
372 void DispatchInstallEventAfterStartWorker(const StatusCallback& callback); 372 void DispatchInstallEventAfterStartWorker(const StatusCallback& callback);
373 void DispatchActivateEventAfterStartWorker(const StatusCallback& callback); 373 void DispatchActivateEventAfterStartWorker(const StatusCallback& callback);
374 374
375 void DispatchMessageEventInternal( 375 void DispatchMessageEventInternal(
376 const base::string16& message, 376 const base::string16& message,
377 const std::vector<TransferredMessagePort>& sent_message_ports, 377 const std::vector<TransferredMessagePort>& sent_message_ports,
378 const StatusCallback& callback); 378 const StatusCallback& callback);
379 379
380 // Message handlers. 380 // Message handlers.
381
382 // This corresponds to the spec's matchAll(options) steps.
381 void OnGetClients(int request_id, 383 void OnGetClients(int request_id,
382 const ServiceWorkerClientQueryOptions& options); 384 const ServiceWorkerClientQueryOptions& options);
385
383 void OnActivateEventFinished(int request_id, 386 void OnActivateEventFinished(int request_id,
384 blink::WebServiceWorkerEventResult result); 387 blink::WebServiceWorkerEventResult result);
385 void OnInstallEventFinished(int request_id, 388 void OnInstallEventFinished(int request_id,
386 blink::WebServiceWorkerEventResult result); 389 blink::WebServiceWorkerEventResult result);
387 void OnFetchEventFinished(int request_id, 390 void OnFetchEventFinished(int request_id,
388 ServiceWorkerFetchEventResult result, 391 ServiceWorkerFetchEventResult result,
389 const ServiceWorkerResponse& response); 392 const ServiceWorkerResponse& response);
390 void OnSyncEventFinished(int request_id); 393 void OnSyncEventFinished(int request_id);
391 void OnNotificationClickEventFinished(int request_id); 394 void OnNotificationClickEventFinished(int request_id);
392 void OnPushEventFinished(int request_id, 395 void OnPushEventFinished(int request_id,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 void DidSkipWaiting(int request_id); 433 void DidSkipWaiting(int request_id);
431 434
432 void GetWindowClients(int request_id, 435 void GetWindowClients(int request_id,
433 const ServiceWorkerClientQueryOptions& options); 436 const ServiceWorkerClientQueryOptions& options);
434 void DidGetWindowClients(int request_id, 437 void DidGetWindowClients(int request_id,
435 const ServiceWorkerClientQueryOptions& options, 438 const ServiceWorkerClientQueryOptions& options,
436 scoped_ptr<ServiceWorkerClients> clients); 439 scoped_ptr<ServiceWorkerClients> clients);
437 void GetNonWindowClients(int request_id, 440 void GetNonWindowClients(int request_id,
438 const ServiceWorkerClientQueryOptions& options, 441 const ServiceWorkerClientQueryOptions& options,
439 ServiceWorkerClients* clients); 442 ServiceWorkerClients* clients);
443 void OnGetClientsFinished(int request_id,
444 const ServiceWorkerClients& clients);
440 445
441 // The timeout timer periodically calls OnTimeoutTimer, which stops the worker 446 // The timeout timer periodically calls OnTimeoutTimer, which stops the worker
442 // if it is excessively idle or unresponsive to ping. 447 // if it is excessively idle or unresponsive to ping.
443 void StartTimeoutTimer(); 448 void StartTimeoutTimer();
444 void StopTimeoutTimer(); 449 void StopTimeoutTimer();
445 void OnTimeoutTimer(); 450 void OnTimeoutTimer();
446 451
447 // The ping protocol is for terminating workers that are taking excessively 452 // The ping protocol is for terminating workers that are taking excessively
448 // long executing JavaScript (e.g., stuck in while(true) {}). Periodically a 453 // long executing JavaScript (e.g., stuck in while(true) {}). Periodically a
449 // ping IPC is sent to the worker context and if we timeout waiting for a 454 // ping IPC is sent to the worker context and if we timeout waiting for a
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 scoped_ptr<net::HttpResponseInfo> main_script_http_info_; 534 scoped_ptr<net::HttpResponseInfo> main_script_http_info_;
530 535
531 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; 536 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_;
532 537
533 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); 538 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion);
534 }; 539 };
535 540
536 } // namespace content 541 } // namespace content
537 542
538 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 543 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698