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_process_host.h" | 5 #include "content/browser/worker_host/worker_process_host.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 filter->Send(new_message); | 462 filter->Send(new_message); |
463 if (message.type() == WorkerMsg_StartWorkerContext::ID) { | 463 if (message.type() == WorkerMsg_StartWorkerContext::ID) { |
464 WorkerDevToolsManager::GetInstance()->WorkerContextStarted( | 464 WorkerDevToolsManager::GetInstance()->WorkerContextStarted( |
465 this, route_id); | 465 this, route_id); |
466 } | 466 } |
467 return; | 467 return; |
468 } | 468 } |
469 } | 469 } |
470 | 470 |
471 void WorkerProcessHost::ShutdownSocketStreamDispatcherHostIfNecessary() { | 471 void WorkerProcessHost::ShutdownSocketStreamDispatcherHostIfNecessary() { |
472 if (!instances_.size() && socket_stream_dispatcher_host_) { | 472 if (!instances_.size() && socket_stream_dispatcher_host_.get()) { |
473 // We can assume that this object is going to delete, because | 473 // We can assume that this object is going to delete, because |
474 // currently a WorkerInstance will never be added to a WorkerProcessHost | 474 // currently a WorkerInstance will never be added to a WorkerProcessHost |
475 // once it is initialized. | 475 // once it is initialized. |
476 | 476 |
477 // SocketStreamDispatcherHost should be notified now that the worker | 477 // SocketStreamDispatcherHost should be notified now that the worker |
478 // process will shutdown soon. | 478 // process will shutdown soon. |
479 socket_stream_dispatcher_host_->Shutdown(); | 479 socket_stream_dispatcher_host_->Shutdown(); |
480 socket_stream_dispatcher_host_ = NULL; | 480 socket_stream_dispatcher_host_ = NULL; |
481 } | 481 } |
482 } | 482 } |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 return false; | 715 return false; |
716 } | 716 } |
717 | 717 |
718 WorkerProcessHost::WorkerInstance::FilterInfo | 718 WorkerProcessHost::WorkerInstance::FilterInfo |
719 WorkerProcessHost::WorkerInstance::GetFilter() const { | 719 WorkerProcessHost::WorkerInstance::GetFilter() const { |
720 DCHECK(NumFilters() == 1); | 720 DCHECK(NumFilters() == 1); |
721 return *filters_.begin(); | 721 return *filters_.begin(); |
722 } | 722 } |
723 | 723 |
724 } // namespace content | 724 } // namespace content |
OLD | NEW |