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 20 matching lines...) Expand all Loading... |
31 unsigned long estimated_size) { | 31 unsigned long estimated_size) { |
32 if (is_unique_origin_) | 32 if (is_unique_origin_) |
33 return false; | 33 return false; |
34 bool result = false; | 34 bool result = false; |
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() { | |
42 if (is_unique_origin_) | |
43 return false; | |
44 bool result = false; | |
45 thread_safe_sender_->Send( | |
46 new WorkerProcessHostMsg_RequestFileSystemAccessSync( | |
47 routing_id_, origin_url_, &result)); | |
48 return result; | |
49 } | |
50 | |
51 bool SharedWorkerPermissionClientProxy::requestFileSystemAccessSync() { | 41 bool SharedWorkerPermissionClientProxy::requestFileSystemAccessSync() { |
52 if (is_unique_origin_) | 42 if (is_unique_origin_) |
53 return false; | 43 return false; |
54 bool result = false; | 44 bool result = false; |
55 thread_safe_sender_->Send( | 45 thread_safe_sender_->Send( |
56 new WorkerProcessHostMsg_RequestFileSystemAccessSync( | 46 new WorkerProcessHostMsg_RequestFileSystemAccessSync( |
57 routing_id_, origin_url_, &result)); | 47 routing_id_, origin_url_, &result)); |
58 return result; | 48 return result; |
59 } | 49 } |
60 | 50 |
61 bool SharedWorkerPermissionClientProxy::allowIndexedDB( | 51 bool SharedWorkerPermissionClientProxy::allowIndexedDB( |
62 const blink::WebString& name) { | 52 const blink::WebString& name) { |
63 if (is_unique_origin_) | 53 if (is_unique_origin_) |
64 return false; | 54 return false; |
65 bool result = false; | 55 bool result = false; |
66 thread_safe_sender_->Send(new WorkerProcessHostMsg_AllowIndexedDB( | 56 thread_safe_sender_->Send(new WorkerProcessHostMsg_AllowIndexedDB( |
67 routing_id_, origin_url_, name, &result)); | 57 routing_id_, origin_url_, name, &result)); |
68 return result; | 58 return result; |
69 } | 59 } |
70 | 60 |
71 } // namespace content | 61 } // namespace content |
OLD | NEW |