OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/worker/shared_worker_permission_client_proxy.h" | 5 #include "content/worker/shared_worker_permission_client_proxy.h" |
6 | 6 |
7 #include "content/child/thread_safe_sender.h" | 7 #include "content/child/thread_safe_sender.h" |
8 #include "content/common/worker_messages.h" | 8 #include "content/common/worker_messages.h" |
9 #include "third_party/WebKit/public/platform/WebString.h" | 9 #include "third_party/WebKit/public/platform/WebString.h" |
10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 thread_safe_sender_->Send(new WorkerProcessHostMsg_AllowDatabase( | 35 thread_safe_sender_->Send(new WorkerProcessHostMsg_AllowDatabase( |
36 routing_id_, origin_url_, name, display_name, | 36 routing_id_, origin_url_, name, display_name, |
37 estimated_size, &result)); | 37 estimated_size, &result)); |
38 return result; | 38 return result; |
39 } | 39 } |
40 | 40 |
41 bool SharedWorkerPermissionClientProxy::allowFileSystem() { | 41 bool SharedWorkerPermissionClientProxy::allowFileSystem() { |
42 if (is_unique_origin_) | 42 if (is_unique_origin_) |
43 return false; | 43 return false; |
44 bool result = false; | 44 bool result = false; |
45 thread_safe_sender_->Send(new WorkerProcessHostMsg_AllowFileSystem( | 45 thread_safe_sender_->Send( |
| 46 new WorkerProcessHostMsg_RequestFileSystemAccessSync( |
46 routing_id_, origin_url_, &result)); | 47 routing_id_, origin_url_, &result)); |
47 return result; | 48 return result; |
48 } | 49 } |
| 50 |
| 51 bool SharedWorkerPermissionClientProxy::requestFileSystemAccessSync() { |
| 52 if (is_unique_origin_) |
| 53 return false; |
| 54 bool result = false; |
| 55 thread_safe_sender_->Send( |
| 56 new WorkerProcessHostMsg_RequestFileSystemAccessSync( |
| 57 routing_id_, origin_url_, &result)); |
| 58 return result; |
| 59 } |
49 | 60 |
50 bool SharedWorkerPermissionClientProxy::allowIndexedDB( | 61 bool SharedWorkerPermissionClientProxy::allowIndexedDB( |
51 const blink::WebString& name) { | 62 const blink::WebString& name) { |
52 if (is_unique_origin_) | 63 if (is_unique_origin_) |
53 return false; | 64 return false; |
54 bool result = false; | 65 bool result = false; |
55 thread_safe_sender_->Send(new WorkerProcessHostMsg_AllowIndexedDB( | 66 thread_safe_sender_->Send(new WorkerProcessHostMsg_AllowIndexedDB( |
56 routing_id_, origin_url_, name, &result)); | 67 routing_id_, origin_url_, name, &result)); |
57 return result; | 68 return result; |
58 } | 69 } |
59 | 70 |
60 } // namespace content | 71 } // namespace content |
OLD | NEW |