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

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

Issue 1406823002: Start of foreign fetch implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 const std::string& client_uuid, 488 const std::string& client_uuid,
489 const ServiceWorkerClientInfo& client); 489 const ServiceWorkerClientInfo& client);
490 void OnSkipWaiting(int request_id); 490 void OnSkipWaiting(int request_id);
491 void OnClaimClients(int request_id); 491 void OnClaimClients(int request_id);
492 void OnPongFromWorker(); 492 void OnPongFromWorker();
493 493
494 void OnFocusClientFinished(int request_id, 494 void OnFocusClientFinished(int request_id,
495 const std::string& client_uuid, 495 const std::string& client_uuid,
496 const ServiceWorkerClientInfo& client); 496 const ServiceWorkerClientInfo& client);
497 497
498 void OnRegisterForeignFetchScopes(const std::vector<GURL>& sub_scopes);
499
498 void DidEnsureLiveRegistrationForStartWorker( 500 void DidEnsureLiveRegistrationForStartWorker(
499 const StatusCallback& callback, 501 const StatusCallback& callback,
500 ServiceWorkerStatusCode status, 502 ServiceWorkerStatusCode status,
501 const scoped_refptr<ServiceWorkerRegistration>& protect); 503 const scoped_refptr<ServiceWorkerRegistration>& protect);
502 void StartWorkerInternal(); 504 void StartWorkerInternal();
503 505
504 void DidSkipWaiting(int request_id); 506 void DidSkipWaiting(int request_id);
505 507
506 void GetWindowClients(int request_id, 508 void GetWindowClients(int request_id,
507 const ServiceWorkerClientQueryOptions& options); 509 const ServiceWorkerClientQueryOptions& options);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 572
571 // Called at the beginning of each Dispatch*Event function: records 573 // Called at the beginning of each Dispatch*Event function: records
572 // the time elapsed since idle (generally the time since the previous 574 // the time elapsed since idle (generally the time since the previous
573 // event ended). 575 // event ended).
574 void OnBeginEvent(); 576 void OnBeginEvent();
575 577
576 const int64 version_id_; 578 const int64 version_id_;
577 const int64 registration_id_; 579 const int64 registration_id_;
578 const GURL script_url_; 580 const GURL script_url_;
579 const GURL scope_; 581 const GURL scope_;
582 std::vector<GURL> foreign_fetch_scopes_;
580 583
581 Status status_ = NEW; 584 Status status_ = NEW;
582 scoped_ptr<EmbeddedWorkerInstance> embedded_worker_; 585 scoped_ptr<EmbeddedWorkerInstance> embedded_worker_;
583 std::vector<StatusCallback> start_callbacks_; 586 std::vector<StatusCallback> start_callbacks_;
584 std::vector<StatusCallback> stop_callbacks_; 587 std::vector<StatusCallback> stop_callbacks_;
585 std::vector<base::Closure> status_change_callbacks_; 588 std::vector<base::Closure> status_change_callbacks_;
586 589
587 // Message callbacks. (Update HasInflightRequests() too when you update this 590 // Message callbacks. (Update HasInflightRequests() too when you update this
588 // list.) 591 // list.)
589 IDMap<PendingRequest<StatusCallback>, IDMapOwnPointer> activate_requests_; 592 IDMap<PendingRequest<StatusCallback>, IDMapOwnPointer> activate_requests_;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 const bool should_exclude_from_uma_ = false; 652 const bool should_exclude_from_uma_ = false;
650 653
651 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; 654 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_;
652 655
653 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); 656 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion);
654 }; 657 };
655 658
656 } // namespace content 659 } // namespace content
657 660
658 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 661 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698