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

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

Issue 771103002: Implement ServiceWorkerClient attributes [2/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 #include "content/browser/service_worker/service_worker_provider_host.h" 5 #include "content/browser/service_worker/service_worker_provider_host.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "content/browser/message_port_message_filter.h" 8 #include "content/browser/message_port_message_filter.h"
9 #include "content/browser/service_worker/service_worker_context_core.h" 9 #include "content/browser/service_worker/service_worker_context_core.h"
10 #include "content/browser/service_worker/service_worker_context_request_handler. h" 10 #include "content/browser/service_worker/service_worker_context_request_handler. h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 void ServiceWorkerProviderHost::Focus(const FocusCallback& callback) { 236 void ServiceWorkerProviderHost::Focus(const FocusCallback& callback) {
237 BrowserThread::PostTask( 237 BrowserThread::PostTask(
238 BrowserThread::UI, FROM_HERE, 238 BrowserThread::UI, FROM_HERE,
239 base::Bind(&FocusOnUIThread, 239 base::Bind(&FocusOnUIThread,
240 render_process_id_, 240 render_process_id_,
241 render_frame_id_, 241 render_frame_id_,
242 callback)); 242 callback));
243 } 243 }
244 244
245 void ServiceWorkerProviderHost::GetClientInfo(
246 int embedded_worker_id,
247 int request_id) {
248 dispatcher_host_->Send(new ServiceWorkerMsg_GetClientInfo(
249 kDocumentMainThreadId, embedded_worker_id, request_id, provider_id()));
250 }
251
245 void ServiceWorkerProviderHost::AddScopedProcessReferenceToPattern( 252 void ServiceWorkerProviderHost::AddScopedProcessReferenceToPattern(
246 const GURL& pattern) { 253 const GURL& pattern) {
247 associated_patterns_.push_back(pattern); 254 associated_patterns_.push_back(pattern);
248 IncreaseProcessReference(pattern); 255 IncreaseProcessReference(pattern);
249 } 256 }
250 257
251 ServiceWorkerObjectInfo ServiceWorkerProviderHost::CreateHandleAndPass( 258 ServiceWorkerObjectInfo ServiceWorkerProviderHost::CreateHandleAndPass(
252 ServiceWorkerVersion* version) { 259 ServiceWorkerVersion* version) {
253 ServiceWorkerObjectInfo info; 260 ServiceWorkerObjectInfo info;
254 if (context_ && version) { 261 if (context_ && version) {
(...skipping 23 matching lines...) Expand all
278 context_->process_manager()->RemoveProcessReferenceFromPattern( 285 context_->process_manager()->RemoveProcessReferenceFromPattern(
279 pattern, render_process_id_); 286 pattern, render_process_id_);
280 } 287 }
281 } 288 }
282 289
283 bool ServiceWorkerProviderHost::IsContextAlive() { 290 bool ServiceWorkerProviderHost::IsContextAlive() {
284 return context_ != NULL; 291 return context_ != NULL;
285 } 292 }
286 293
287 } // namespace content 294 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698