| 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 IPC_MESSAGE_HANDLER(WorkerHostMsg_WorkerScriptLoadFailed, | 384 IPC_MESSAGE_HANDLER(WorkerHostMsg_WorkerScriptLoadFailed, |
| 385 OnWorkerScriptLoadFailed) | 385 OnWorkerScriptLoadFailed) |
| 386 IPC_MESSAGE_HANDLER(WorkerHostMsg_WorkerConnected, | 386 IPC_MESSAGE_HANDLER(WorkerHostMsg_WorkerConnected, |
| 387 OnWorkerConnected) | 387 OnWorkerConnected) |
| 388 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowDatabase, OnAllowDatabase) | 388 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowDatabase, OnAllowDatabase) |
| 389 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowFileSystem, OnAllowFileSystem) | 389 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowFileSystem, OnAllowFileSystem) |
| 390 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowIndexedDB, OnAllowIndexedDB) | 390 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowIndexedDB, OnAllowIndexedDB) |
| 391 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_ForceKillWorker, | 391 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_ForceKillWorker, |
| 392 OnForceKillWorkerProcess) | 392 OnForceKillWorkerProcess) |
| 393 IPC_MESSAGE_UNHANDLED(handled = false) | 393 IPC_MESSAGE_UNHANDLED(handled = false) |
| 394 IPC_END_MESSAGE_MAP_EX() | 394 IPC_END_MESSAGE_MAP() |
| 395 | 395 |
| 396 return handled; | 396 return handled; |
| 397 } | 397 } |
| 398 | 398 |
| 399 // Sent to notify the browser process when a worker context invokes close(), so | 399 // Sent to notify the browser process when a worker context invokes close(), so |
| 400 // no new connections are sent to shared workers. | 400 // no new connections are sent to shared workers. |
| 401 void WorkerProcessHost::OnWorkerContextClosed(int worker_route_id) { | 401 void WorkerProcessHost::OnWorkerContextClosed(int worker_route_id) { |
| 402 for (Instances::iterator i = instances_.begin(); i != instances_.end(); ++i) { | 402 for (Instances::iterator i = instances_.begin(); i != instances_.end(); ++i) { |
| 403 if (i->worker_route_id() == worker_route_id) { | 403 if (i->worker_route_id() == worker_route_id) { |
| 404 // Set the closed flag - this will stop any further messages from | 404 // Set the closed flag - this will stop any further messages from |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 return false; | 820 return false; |
| 821 } | 821 } |
| 822 | 822 |
| 823 WorkerProcessHost::WorkerInstance::FilterInfo | 823 WorkerProcessHost::WorkerInstance::FilterInfo |
| 824 WorkerProcessHost::WorkerInstance::GetFilter() const { | 824 WorkerProcessHost::WorkerInstance::GetFilter() const { |
| 825 DCHECK(NumFilters() == 1); | 825 DCHECK(NumFilters() == 1); |
| 826 return *filters_.begin(); | 826 return *filters_.begin(); |
| 827 } | 827 } |
| 828 | 828 |
| 829 } // namespace content | 829 } // namespace content |
| OLD | NEW |