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

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

Issue 871853002: ServiceWorker: add ServiceWorkerClients.claim() support (2/3). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove assignment within conditional expression Created 5 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_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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // focusing action was successful. 145 // focusing action was successful.
146 void Focus(const FocusCallback& callback); 146 void Focus(const FocusCallback& callback);
147 147
148 // Asks the renderer to send back the document information. 148 // Asks the renderer to send back the document information.
149 void GetClientInfo(int embedded_worker_id, int request_id); 149 void GetClientInfo(int embedded_worker_id, int request_id);
150 150
151 // Adds reference of this host's process to the |pattern|, the reference will 151 // Adds reference of this host's process to the |pattern|, the reference will
152 // be removed in destructor. 152 // be removed in destructor.
153 void AddScopedProcessReferenceToPattern(const GURL& pattern); 153 void AddScopedProcessReferenceToPattern(const GURL& pattern);
154 154
155 // |registration| claims the document to be controlled.
156 void ClaimedByRegistration(ServiceWorkerRegistration* registration);
157
155 // Methods to support cross site navigations. 158 // Methods to support cross site navigations.
156 void PrepareForCrossSiteTransfer(); 159 void PrepareForCrossSiteTransfer();
157 void CompleteCrossSiteTransfer( 160 void CompleteCrossSiteTransfer(
158 int new_process_id, 161 int new_process_id,
159 int new_frame_id, 162 int new_frame_id,
160 int new_provider_id, 163 int new_provider_id,
161 ServiceWorkerDispatcherHost* dispatcher_host); 164 ServiceWorkerDispatcherHost* dispatcher_host);
162 ServiceWorkerDispatcherHost* dispatcher_host() const { 165 ServiceWorkerDispatcherHost* dispatcher_host() const {
163 return dispatcher_host_; 166 return dispatcher_host_;
164 } 167 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 GURL topmost_frame_url_; 216 GURL topmost_frame_url_;
214 217
215 std::vector<GURL> associated_patterns_; 218 std::vector<GURL> associated_patterns_;
216 scoped_refptr<ServiceWorkerRegistration> associated_registration_; 219 scoped_refptr<ServiceWorkerRegistration> associated_registration_;
217 220
218 scoped_refptr<ServiceWorkerVersion> controlling_version_; 221 scoped_refptr<ServiceWorkerVersion> controlling_version_;
219 scoped_refptr<ServiceWorkerVersion> running_hosted_version_; 222 scoped_refptr<ServiceWorkerVersion> running_hosted_version_;
220 base::WeakPtr<ServiceWorkerContextCore> context_; 223 base::WeakPtr<ServiceWorkerContextCore> context_;
221 ServiceWorkerDispatcherHost* dispatcher_host_; 224 ServiceWorkerDispatcherHost* dispatcher_host_;
222 bool allow_association_; 225 bool allow_association_;
226 bool is_claiming_;
223 227
224 std::vector<base::Closure> queued_events_; 228 std::vector<base::Closure> queued_events_;
225 229
226 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); 230 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost);
227 }; 231 };
228 232
229 } // namespace content 233 } // namespace content
230 234
231 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 235 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698