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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 OnWorkerContextClosed) | 380 OnWorkerContextClosed) |
381 IPC_MESSAGE_HANDLER(WorkerHostMsg_WorkerContextDestroyed, | 381 IPC_MESSAGE_HANDLER(WorkerHostMsg_WorkerContextDestroyed, |
382 OnWorkerContextDestroyed) | 382 OnWorkerContextDestroyed) |
383 IPC_MESSAGE_HANDLER(WorkerHostMsg_WorkerScriptLoaded, | 383 IPC_MESSAGE_HANDLER(WorkerHostMsg_WorkerScriptLoaded, |
384 OnWorkerScriptLoaded) | 384 OnWorkerScriptLoaded) |
385 IPC_MESSAGE_HANDLER(WorkerHostMsg_WorkerScriptLoadFailed, | 385 IPC_MESSAGE_HANDLER(WorkerHostMsg_WorkerScriptLoadFailed, |
386 OnWorkerScriptLoadFailed) | 386 OnWorkerScriptLoadFailed) |
387 IPC_MESSAGE_HANDLER(WorkerHostMsg_WorkerConnected, | 387 IPC_MESSAGE_HANDLER(WorkerHostMsg_WorkerConnected, |
388 OnWorkerConnected) | 388 OnWorkerConnected) |
389 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowDatabase, OnAllowDatabase) | 389 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowDatabase, OnAllowDatabase) |
390 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowFileSystem, OnAllowFileSystem) | 390 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_RequestFileSystemAccessSync, OnRequ
estFileSystemAccessSync) |
391 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowIndexedDB, OnAllowIndexedDB) | 391 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowIndexedDB, OnAllowIndexedDB) |
392 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_ForceKillWorker, | 392 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_ForceKillWorker, |
393 OnForceKillWorkerProcess) | 393 OnForceKillWorkerProcess) |
394 IPC_MESSAGE_UNHANDLED(handled = false) | 394 IPC_MESSAGE_UNHANDLED(handled = false) |
395 IPC_END_MESSAGE_MAP_EX() | 395 IPC_END_MESSAGE_MAP_EX() |
396 | 396 |
397 if (!msg_is_ok) { | 397 if (!msg_is_ok) { |
398 NOTREACHED(); | 398 NOTREACHED(); |
399 RecordAction(base::UserMetricsAction("BadMessageTerminate_WPH")); | 399 RecordAction(base::UserMetricsAction("BadMessageTerminate_WPH")); |
400 base::KillProcess( | 400 base::KillProcess( |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 const GURL& url, | 473 const GURL& url, |
474 const base::string16& name, | 474 const base::string16& name, |
475 const base::string16& display_name, | 475 const base::string16& display_name, |
476 unsigned long estimated_size, | 476 unsigned long estimated_size, |
477 bool* result) { | 477 bool* result) { |
478 *result = GetContentClient()->browser()->AllowWorkerDatabase( | 478 *result = GetContentClient()->browser()->AllowWorkerDatabase( |
479 url, name, display_name, estimated_size, resource_context_, | 479 url, name, display_name, estimated_size, resource_context_, |
480 GetRenderFrameIDsForWorker(worker_route_id)); | 480 GetRenderFrameIDsForWorker(worker_route_id)); |
481 } | 481 } |
482 | 482 |
483 void WorkerProcessHost::OnAllowFileSystem(int worker_route_id, | 483 void WorkerProcessHost::OnRequestFileSystemAccessSync(int worker_route_id, |
484 const GURL& url, | 484 const GURL& url, |
485 bool* result) { | 485 bool* result) { |
486 *result = GetContentClient()->browser()->AllowWorkerFileSystem( | 486 *result = GetContentClient()->browser()->AllowWorkerFileSystem( |
487 url, resource_context_, GetRenderFrameIDsForWorker(worker_route_id)); | 487 url, resource_context_, GetRenderFrameIDsForWorker(worker_route_id)); |
488 } | 488 } |
489 | 489 |
490 void WorkerProcessHost::OnAllowIndexedDB(int worker_route_id, | 490 void WorkerProcessHost::OnAllowIndexedDB(int worker_route_id, |
491 const GURL& url, | 491 const GURL& url, |
492 const base::string16& name, | 492 const base::string16& name, |
493 bool* result) { | 493 bool* result) { |
494 *result = GetContentClient()->browser()->AllowWorkerIndexedDB( | 494 *result = GetContentClient()->browser()->AllowWorkerIndexedDB( |
495 url, name, resource_context_, | 495 url, name, resource_context_, |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 return false; | 828 return false; |
829 } | 829 } |
830 | 830 |
831 WorkerProcessHost::WorkerInstance::FilterInfo | 831 WorkerProcessHost::WorkerInstance::FilterInfo |
832 WorkerProcessHost::WorkerInstance::GetFilter() const { | 832 WorkerProcessHost::WorkerInstance::GetFilter() const { |
833 DCHECK(NumFilters() == 1); | 833 DCHECK(NumFilters() == 1); |
834 return *filters_.begin(); | 834 return *filters_.begin(); |
835 } | 835 } |
836 | 836 |
837 } // namespace content | 837 } // namespace content |
OLD | NEW |