OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/worker_host/worker_service_impl.h" | 5 #include "content/browser/worker_host/worker_service_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 // TODO(atwilson): This won't work if the message is from a worker process. | 354 // TODO(atwilson): This won't work if the message is from a worker process. |
355 // We don't support that yet though (this message is only sent from | 355 // We don't support that yet though (this message is only sent from |
356 // renderers) but when we do, we'll need to add code to pass in the current | 356 // renderers) but when we do, we'll need to add code to pass in the current |
357 // worker's document set for nested workers. | 357 // worker's document set for nested workers. |
358 instance->worker_document_set()->Add( | 358 instance->worker_document_set()->Add( |
359 filter, params.document_id, filter->render_process_id(), | 359 filter, params.document_id, filter->render_process_id(), |
360 params.render_view_route_id); | 360 params.render_view_route_id); |
361 } | 361 } |
362 } | 362 } |
363 | 363 |
364 void WorkerServiceImpl::CancelCreateDedicatedWorker( | |
365 int route_id, | |
366 WorkerMessageFilter* filter) { | |
367 | |
368 NOTREACHED(); | |
369 } | |
370 | |
371 void WorkerServiceImpl::ForwardToWorker(const IPC::Message& message, | 364 void WorkerServiceImpl::ForwardToWorker(const IPC::Message& message, |
372 WorkerMessageFilter* filter) { | 365 WorkerMessageFilter* filter) { |
373 for (WorkerProcessHostIterator iter; !iter.Done(); ++iter) { | 366 for (WorkerProcessHostIterator iter; !iter.Done(); ++iter) { |
374 if (iter->FilterMessage(message, filter)) | 367 if (iter->FilterMessage(message, filter)) |
375 return; | 368 return; |
376 } | 369 } |
377 | 370 |
378 // TODO(jabdelmalek): tell filter that callee is gone | 371 // TODO(jabdelmalek): tell filter that callee is gone |
379 } | 372 } |
380 | 373 |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 return instance; | 718 return instance; |
726 | 719 |
727 // No existing pending worker - create a new one. | 720 // No existing pending worker - create a new one. |
728 WorkerProcessHost::WorkerInstance pending( | 721 WorkerProcessHost::WorkerInstance pending( |
729 url, true, name, resource_context, partition); | 722 url, true, name, resource_context, partition); |
730 pending_shared_workers_.push_back(pending); | 723 pending_shared_workers_.push_back(pending); |
731 return &pending_shared_workers_.back(); | 724 return &pending_shared_workers_.back(); |
732 } | 725 } |
733 | 726 |
734 } // namespace content | 727 } // namespace content |
OLD | NEW |