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

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

Issue 477593007: ServiceWorker: Make '.ready' return a promise to be resolved with ServiceWorkerRegistration (2/3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 3 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 | Annotate | Revision Log
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_PROVIDER_HOST_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 return running_hosted_version_.get(); 76 return running_hosted_version_.get();
77 } 77 }
78 78
79 void SetDocumentUrl(const GURL& url); 79 void SetDocumentUrl(const GURL& url);
80 const GURL& document_url() const { return document_url_; } 80 const GURL& document_url() const { return document_url_; }
81 81
82 // Associates to |registration| to listen for its version change events. 82 // Associates to |registration| to listen for its version change events.
83 void AssociateRegistration(ServiceWorkerRegistration* registration); 83 void AssociateRegistration(ServiceWorkerRegistration* registration);
84 84
85 // Clears the associated registration and stop listening to it. 85 // Clears the associated registration and stop listening to it.
86 void UnassociateRegistration(); 86 void DisassociateRegistration();
87 87
88 // Returns false if the version is not in the expected STARTING in our 88 // Returns false if the version is not in the expected STARTING in our
89 // process state. That would be indicative of a bad IPC message. 89 // process state. That would be indicative of a bad IPC message.
90 bool SetHostedVersionId(int64 versions_id); 90 bool SetHostedVersionId(int64 versions_id);
91 91
92 // Returns a handler for a request, the handler may return NULL if 92 // Returns a handler for a request, the handler may return NULL if
93 // the request doesn't require special handling. 93 // the request doesn't require special handling.
94 scoped_ptr<ServiceWorkerRequestHandler> CreateRequestHandler( 94 scoped_ptr<ServiceWorkerRequestHandler> CreateRequestHandler(
95 ResourceType resource_type, 95 ResourceType resource_type,
96 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, 96 base::WeakPtr<storage::BlobStorageContext> blob_storage_context,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 scoped_refptr<ServiceWorkerVersion> running_hosted_version_; 153 scoped_refptr<ServiceWorkerVersion> running_hosted_version_;
154 base::WeakPtr<ServiceWorkerContextCore> context_; 154 base::WeakPtr<ServiceWorkerContextCore> context_;
155 ServiceWorkerDispatcherHost* dispatcher_host_; 155 ServiceWorkerDispatcherHost* dispatcher_host_;
156 156
157 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); 157 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost);
158 }; 158 };
159 159
160 } // namespace content 160 } // namespace content
161 161
162 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 162 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698