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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 OnWorkerContextClosed) | 379 OnWorkerContextClosed) |
380 IPC_MESSAGE_HANDLER(WorkerHostMsg_WorkerContextDestroyed, | 380 IPC_MESSAGE_HANDLER(WorkerHostMsg_WorkerContextDestroyed, |
381 OnWorkerContextDestroyed) | 381 OnWorkerContextDestroyed) |
382 IPC_MESSAGE_HANDLER(WorkerHostMsg_WorkerScriptLoaded, | 382 IPC_MESSAGE_HANDLER(WorkerHostMsg_WorkerScriptLoaded, |
383 OnWorkerScriptLoaded) | 383 OnWorkerScriptLoaded) |
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_RequestFileSystemAccessSync, |
| 390 OnRequestFileSystemAccessSync) |
390 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowIndexedDB, OnAllowIndexedDB) | 391 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowIndexedDB, OnAllowIndexedDB) |
391 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_ForceKillWorker, | 392 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_ForceKillWorker, |
392 OnForceKillWorkerProcess) | 393 OnForceKillWorkerProcess) |
393 IPC_MESSAGE_UNHANDLED(handled = false) | 394 IPC_MESSAGE_UNHANDLED(handled = false) |
394 IPC_END_MESSAGE_MAP() | 395 IPC_END_MESSAGE_MAP() |
395 | 396 |
396 return handled; | 397 return handled; |
397 } | 398 } |
398 | 399 |
399 // Sent to notify the browser process when a worker context invokes close(), so | 400 // Sent to notify the browser process when a worker context invokes close(), so |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 const GURL& url, | 466 const GURL& url, |
466 const base::string16& name, | 467 const base::string16& name, |
467 const base::string16& display_name, | 468 const base::string16& display_name, |
468 unsigned long estimated_size, | 469 unsigned long estimated_size, |
469 bool* result) { | 470 bool* result) { |
470 *result = GetContentClient()->browser()->AllowWorkerDatabase( | 471 *result = GetContentClient()->browser()->AllowWorkerDatabase( |
471 url, name, display_name, estimated_size, resource_context_, | 472 url, name, display_name, estimated_size, resource_context_, |
472 GetRenderFrameIDsForWorker(worker_route_id)); | 473 GetRenderFrameIDsForWorker(worker_route_id)); |
473 } | 474 } |
474 | 475 |
475 void WorkerProcessHost::OnAllowFileSystem(int worker_route_id, | 476 void WorkerProcessHost::OnRequestFileSystemAccessSync(int worker_route_id, |
476 const GURL& url, | 477 const GURL& url, |
477 bool* result) { | 478 bool* result) { |
478 *result = GetContentClient()->browser()->AllowWorkerFileSystem( | 479 *result = GetContentClient()->browser()->AllowWorkerFileSystem( |
479 url, resource_context_, GetRenderFrameIDsForWorker(worker_route_id)); | 480 url, resource_context_, GetRenderFrameIDsForWorker(worker_route_id)); |
480 } | 481 } |
481 | 482 |
482 void WorkerProcessHost::OnAllowIndexedDB(int worker_route_id, | 483 void WorkerProcessHost::OnAllowIndexedDB(int worker_route_id, |
483 const GURL& url, | 484 const GURL& url, |
484 const base::string16& name, | 485 const base::string16& name, |
485 bool* result) { | 486 bool* result) { |
486 *result = GetContentClient()->browser()->AllowWorkerIndexedDB( | 487 *result = GetContentClient()->browser()->AllowWorkerIndexedDB( |
487 url, name, resource_context_, | 488 url, name, resource_context_, |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 return false; | 821 return false; |
821 } | 822 } |
822 | 823 |
823 WorkerProcessHost::WorkerInstance::FilterInfo | 824 WorkerProcessHost::WorkerInstance::FilterInfo |
824 WorkerProcessHost::WorkerInstance::GetFilter() const { | 825 WorkerProcessHost::WorkerInstance::GetFilter() const { |
825 DCHECK(NumFilters() == 1); | 826 DCHECK(NumFilters() == 1); |
826 return *filters_.begin(); | 827 return *filters_.begin(); |
827 } | 828 } |
828 | 829 |
829 } // namespace content | 830 } // namespace content |
OLD | NEW |