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

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: Filter out off-origin match; fix layout test Created 4 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <functional> 10 #include <functional>
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 void DispatchInstallEventAfterStartWorker(const StatusCallback& callback); 539 void DispatchInstallEventAfterStartWorker(const StatusCallback& callback);
540 void DispatchActivateEventAfterStartWorker(const StatusCallback& callback); 540 void DispatchActivateEventAfterStartWorker(const StatusCallback& callback);
541 541
542 void DispatchMessageEventInternal( 542 void DispatchMessageEventInternal(
543 const base::string16& message, 543 const base::string16& message,
544 const std::vector<TransferredMessagePort>& sent_message_ports, 544 const std::vector<TransferredMessagePort>& sent_message_ports,
545 const StatusCallback& callback); 545 const StatusCallback& callback);
546 546
547 // Message handlers. 547 // Message handlers.
548 548
549 // This corresponds to the spec's get(id) steps.
550 void OnGetClient(int request_id, const std::string& client_uuid);
551
549 // This corresponds to the spec's matchAll(options) steps. 552 // This corresponds to the spec's matchAll(options) steps.
550 void OnGetClients(int request_id, 553 void OnGetClients(int request_id,
551 const ServiceWorkerClientQueryOptions& options); 554 const ServiceWorkerClientQueryOptions& options);
552 555
553 void OnActivateEventFinished(int request_id, 556 void OnActivateEventFinished(int request_id,
554 blink::WebServiceWorkerEventResult result); 557 blink::WebServiceWorkerEventResult result);
555 void OnInstallEventFinished(int request_id, 558 void OnInstallEventFinished(int request_id,
556 blink::WebServiceWorkerEventResult result); 559 blink::WebServiceWorkerEventResult result);
557 void OnFetchEventFinished(int request_id, 560 void OnFetchEventFinished(int request_id,
558 ServiceWorkerFetchEventResult result, 561 ServiceWorkerFetchEventResult result,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 void OnRegisterForeignFetchScopes(const std::vector<GURL>& sub_scopes); 596 void OnRegisterForeignFetchScopes(const std::vector<GURL>& sub_scopes);
594 597
595 void DidEnsureLiveRegistrationForStartWorker( 598 void DidEnsureLiveRegistrationForStartWorker(
596 const StatusCallback& callback, 599 const StatusCallback& callback,
597 ServiceWorkerStatusCode status, 600 ServiceWorkerStatusCode status,
598 const scoped_refptr<ServiceWorkerRegistration>& registration); 601 const scoped_refptr<ServiceWorkerRegistration>& registration);
599 void StartWorkerInternal(); 602 void StartWorkerInternal();
600 603
601 void DidSkipWaiting(int request_id); 604 void DidSkipWaiting(int request_id);
602 605
606 void OnGetClientFinished(int request_id,
607 const ServiceWorkerClientInfo& client);
608
603 void OnGetClientsFinished(int request_id, ServiceWorkerClients* clients); 609 void OnGetClientsFinished(int request_id, ServiceWorkerClients* clients);
604 610
605 // The timeout timer periodically calls OnTimeoutTimer, which stops the worker 611 // The timeout timer periodically calls OnTimeoutTimer, which stops the worker
606 // if it is excessively idle or unresponsive to ping. 612 // if it is excessively idle or unresponsive to ping.
607 void StartTimeoutTimer(); 613 void StartTimeoutTimer();
608 void StopTimeoutTimer(); 614 void StopTimeoutTimer();
609 void OnTimeoutTimer(); 615 void OnTimeoutTimer();
610 void SetTimeoutTimerInterval(base::TimeDelta interval); 616 void SetTimeoutTimerInterval(base::TimeDelta interval);
611 617
612 // Called by PingController for ping protocol. 618 // Called by PingController for ping protocol.
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 829
824 // At this point |this| can have been deleted, so don't do anything other 830 // At this point |this| can have been deleted, so don't do anything other
825 // than returning. 831 // than returning.
826 832
827 return true; 833 return true;
828 } 834 }
829 835
830 } // namespace content 836 } // namespace content
831 837
832 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 838 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698