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

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: Remove unnecessary condition 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 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 const std::vector<TransferredMessagePort>& sent_message_ports, 528 const std::vector<TransferredMessagePort>& sent_message_ports,
529 const StatusCallback& callback); 529 const StatusCallback& callback);
530 530
531 void DispatchMessageEventInternal( 531 void DispatchMessageEventInternal(
532 const base::string16& message, 532 const base::string16& message,
533 const std::vector<TransferredMessagePort>& sent_message_ports, 533 const std::vector<TransferredMessagePort>& sent_message_ports,
534 const StatusCallback& callback); 534 const StatusCallback& callback);
535 535
536 // Message handlers. 536 // Message handlers.
537 537
538 // This corresponds to the spec's get(id) steps.
539 void OnGetClient(int request_id, const std::string& client_uuid);
540
538 // This corresponds to the spec's matchAll(options) steps. 541 // This corresponds to the spec's matchAll(options) steps.
539 void OnGetClients(int request_id, 542 void OnGetClients(int request_id,
540 const ServiceWorkerClientQueryOptions& options); 543 const ServiceWorkerClientQueryOptions& options);
541 544
542 void OnSimpleEventResponse(int request_id, 545 void OnSimpleEventResponse(int request_id,
543 blink::WebServiceWorkerEventResult result); 546 blink::WebServiceWorkerEventResult result);
544 void OnOpenWindow(int request_id, GURL url); 547 void OnOpenWindow(int request_id, GURL url);
545 void OnOpenWindowFinished(int request_id, 548 void OnOpenWindowFinished(int request_id,
546 ServiceWorkerStatusCode status, 549 ServiceWorkerStatusCode status,
547 const std::string& client_uuid,
548 const ServiceWorkerClientInfo& client_info); 550 const ServiceWorkerClientInfo& client_info);
549 551
550 void OnSetCachedMetadata(const GURL& url, const std::vector<char>& data); 552 void OnSetCachedMetadata(const GURL& url, const std::vector<char>& data);
551 void OnSetCachedMetadataFinished(int64_t callback_id, int result); 553 void OnSetCachedMetadataFinished(int64_t callback_id, int result);
552 void OnClearCachedMetadata(const GURL& url); 554 void OnClearCachedMetadata(const GURL& url);
553 void OnClearCachedMetadataFinished(int64_t callback_id, int result); 555 void OnClearCachedMetadataFinished(int64_t callback_id, int result);
554 556
555 void OnPostMessageToClient( 557 void OnPostMessageToClient(
556 const std::string& client_uuid, 558 const std::string& client_uuid,
557 const base::string16& message, 559 const base::string16& message,
558 const std::vector<TransferredMessagePort>& sent_message_ports); 560 const std::vector<TransferredMessagePort>& sent_message_ports);
559 void OnFocusClient(int request_id, const std::string& client_uuid); 561 void OnFocusClient(int request_id, const std::string& client_uuid);
560 void OnNavigateClient(int request_id, 562 void OnNavigateClient(int request_id,
561 const std::string& client_uuid, 563 const std::string& client_uuid,
562 const GURL& url); 564 const GURL& url);
563 void OnNavigateClientFinished(int request_id, 565 void OnNavigateClientFinished(int request_id,
564 ServiceWorkerStatusCode status, 566 ServiceWorkerStatusCode status,
565 const std::string& client_uuid, 567 const ServiceWorkerClientInfo& client_info);
566 const ServiceWorkerClientInfo& client);
567 void OnSkipWaiting(int request_id); 568 void OnSkipWaiting(int request_id);
568 void OnClaimClients(int request_id); 569 void OnClaimClients(int request_id);
569 void OnPongFromWorker(); 570 void OnPongFromWorker();
570 571
571 void OnFocusClientFinished(int request_id, 572 void OnFocusClientFinished(int request_id,
572 const std::string& client_uuid, 573 const ServiceWorkerClientInfo& client_info);
573 const ServiceWorkerClientInfo& client);
574 574
575 void OnRegisterForeignFetchScopes(const std::vector<GURL>& sub_scopes, 575 void OnRegisterForeignFetchScopes(const std::vector<GURL>& sub_scopes,
576 const std::vector<url::Origin>& origins); 576 const std::vector<url::Origin>& origins);
577 577
578 void DidEnsureLiveRegistrationForStartWorker( 578 void DidEnsureLiveRegistrationForStartWorker(
579 const StatusCallback& callback, 579 const StatusCallback& callback,
580 ServiceWorkerStatusCode status, 580 ServiceWorkerStatusCode status,
581 const scoped_refptr<ServiceWorkerRegistration>& registration); 581 const scoped_refptr<ServiceWorkerRegistration>& registration);
582 void StartWorkerInternal(); 582 void StartWorkerInternal();
583 583
584 void DidSkipWaiting(int request_id); 584 void DidSkipWaiting(int request_id);
585 585
586 void OnGetClientFinished(int request_id,
587 const ServiceWorkerClientInfo& client_info);
588
586 void OnGetClientsFinished(int request_id, ServiceWorkerClients* clients); 589 void OnGetClientsFinished(int request_id, ServiceWorkerClients* clients);
587 590
588 // The timeout timer periodically calls OnTimeoutTimer, which stops the worker 591 // The timeout timer periodically calls OnTimeoutTimer, which stops the worker
589 // if it is excessively idle or unresponsive to ping. 592 // if it is excessively idle or unresponsive to ping.
590 void StartTimeoutTimer(); 593 void StartTimeoutTimer();
591 void StopTimeoutTimer(); 594 void StopTimeoutTimer();
592 void OnTimeoutTimer(); 595 void OnTimeoutTimer();
593 void SetTimeoutTimerInterval(base::TimeDelta interval); 596 void SetTimeoutTimerInterval(base::TimeDelta interval);
594 597
595 // Called by PingController for ping protocol. 598 // Called by PingController for ping protocol.
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 807
805 // At this point |this| can have been deleted, so don't do anything other 808 // At this point |this| can have been deleted, so don't do anything other
806 // than returning. 809 // than returning.
807 810
808 return true; 811 return true;
809 } 812 }
810 813
811 } // namespace content 814 } // namespace content
812 815
813 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 816 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698