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

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

Issue 1439333002: Service Worker: Add Clients.get(id) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add layout test Created 4 years, 11 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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 void DispatchInstallEventAfterStartWorker(const StatusCallback& callback); 452 void DispatchInstallEventAfterStartWorker(const StatusCallback& callback);
453 void DispatchActivateEventAfterStartWorker(const StatusCallback& callback); 453 void DispatchActivateEventAfterStartWorker(const StatusCallback& callback);
454 454
455 void DispatchMessageEventInternal( 455 void DispatchMessageEventInternal(
456 const base::string16& message, 456 const base::string16& message,
457 const std::vector<TransferredMessagePort>& sent_message_ports, 457 const std::vector<TransferredMessagePort>& sent_message_ports,
458 const StatusCallback& callback); 458 const StatusCallback& callback);
459 459
460 // Message handlers. 460 // Message handlers.
461 461
462 void OnGetClient(int request_id, const std::string& id);
462 // This corresponds to the spec's matchAll(options) steps. 463 // This corresponds to the spec's matchAll(options) steps.
463 void OnGetClients(int request_id, 464 void OnGetClients(int request_id,
464 const ServiceWorkerClientQueryOptions& options); 465 const ServiceWorkerClientQueryOptions& options);
465 466
466 void OnActivateEventFinished(int request_id, 467 void OnActivateEventFinished(int request_id,
467 blink::WebServiceWorkerEventResult result); 468 blink::WebServiceWorkerEventResult result);
468 void OnInstallEventFinished(int request_id, 469 void OnInstallEventFinished(int request_id,
469 blink::WebServiceWorkerEventResult result); 470 blink::WebServiceWorkerEventResult result);
470 void OnFetchEventFinished(int request_id, 471 void OnFetchEventFinished(int request_id,
471 ServiceWorkerFetchEventResult result, 472 ServiceWorkerFetchEventResult result,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 void OnRegisterForeignFetchScopes(const std::vector<GURL>& sub_scopes); 514 void OnRegisterForeignFetchScopes(const std::vector<GURL>& sub_scopes);
514 515
515 void DidEnsureLiveRegistrationForStartWorker( 516 void DidEnsureLiveRegistrationForStartWorker(
516 const StatusCallback& callback, 517 const StatusCallback& callback,
517 ServiceWorkerStatusCode status, 518 ServiceWorkerStatusCode status,
518 const scoped_refptr<ServiceWorkerRegistration>& registration); 519 const scoped_refptr<ServiceWorkerRegistration>& registration);
519 void StartWorkerInternal(); 520 void StartWorkerInternal();
520 521
521 void DidSkipWaiting(int request_id); 522 void DidSkipWaiting(int request_id);
522 523
524 void GetClient(int request_id,
525 std::string id,
526 ServiceWorkerClientInfo* client_info);
523 void GetWindowClients(int request_id, 527 void GetWindowClients(int request_id,
524 const ServiceWorkerClientQueryOptions& options); 528 const ServiceWorkerClientQueryOptions& options);
525 void DidGetWindowClients(int request_id, 529 void DidGetWindowClients(int request_id,
526 const ServiceWorkerClientQueryOptions& options, 530 const ServiceWorkerClientQueryOptions& options,
527 scoped_ptr<ServiceWorkerClients> clients); 531 scoped_ptr<ServiceWorkerClients> clients);
528 void GetNonWindowClients(int request_id, 532 void GetNonWindowClients(int request_id,
529 const ServiceWorkerClientQueryOptions& options, 533 const ServiceWorkerClientQueryOptions& options,
530 ServiceWorkerClients* clients); 534 ServiceWorkerClients* clients);
535 void OnGetClientFinished(int request_id, ServiceWorkerClientInfo* client);
531 void OnGetClientsFinished(int request_id, ServiceWorkerClients* clients); 536 void OnGetClientsFinished(int request_id, ServiceWorkerClients* clients);
532 537
533 // The timeout timer periodically calls OnTimeoutTimer, which stops the worker 538 // The timeout timer periodically calls OnTimeoutTimer, which stops the worker
534 // if it is excessively idle or unresponsive to ping. 539 // if it is excessively idle or unresponsive to ping.
535 void StartTimeoutTimer(); 540 void StartTimeoutTimer();
536 void StopTimeoutTimer(); 541 void StopTimeoutTimer();
537 void OnTimeoutTimer(); 542 void OnTimeoutTimer();
538 void SetTimeoutTimerInterval(base::TimeDelta interval); 543 void SetTimeoutTimerInterval(base::TimeDelta interval);
539 544
540 // Called by PingController for ping protocol. 545 // Called by PingController for ping protocol.
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 const bool should_exclude_from_uma_ = false; 680 const bool should_exclude_from_uma_ = false;
676 681
677 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; 682 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_;
678 683
679 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); 684 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion);
680 }; 685 };
681 686
682 } // namespace content 687 } // namespace content
683 688
684 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 689 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698