| 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 "chrome/common/render_messages.h" | 5 #include "chrome/common/render_messages.h" |
| 6 #include "chrome/renderer/worker_permission_client_proxy.h" | 6 #include "chrome/renderer/worker_permission_client_proxy.h" |
| 7 #include "content/public/renderer/render_frame.h" | 7 #include "content/public/renderer/render_frame.h" |
| 8 #include "content/public/renderer/render_thread.h" | 8 #include "content/public/renderer/render_thread.h" |
| 9 #include "ipc/ipc_sync_message_filter.h" | 9 #include "ipc/ipc_sync_message_filter.h" |
| 10 #include "third_party/WebKit/public/platform/WebPermissionCallbacks.h" | 10 #include "third_party/WebKit/public/platform/WebPermissionCallbacks.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 if (is_unique_origin_) | 35 if (is_unique_origin_) |
| 36 return false; | 36 return false; |
| 37 | 37 |
| 38 bool result = false; | 38 bool result = false; |
| 39 sync_message_filter_->Send(new ChromeViewHostMsg_AllowDatabase( | 39 sync_message_filter_->Send(new ChromeViewHostMsg_AllowDatabase( |
| 40 routing_id_, document_origin_url_, top_frame_origin_url_, | 40 routing_id_, document_origin_url_, top_frame_origin_url_, |
| 41 name, display_name, &result)); | 41 name, display_name, &result)); |
| 42 return result; | 42 return result; |
| 43 } | 43 } |
| 44 | 44 |
| 45 bool WorkerPermissionClientProxy::allowFileSystem() { | |
| 46 if (is_unique_origin_) | |
| 47 return false; | |
| 48 | |
| 49 bool result = false; | |
| 50 sync_message_filter_->Send(new ChromeViewHostMsg_RequestFileSystemAccessSync( | |
| 51 routing_id_, document_origin_url_, top_frame_origin_url_, &result)); | |
| 52 return result; | |
| 53 } | |
| 54 | |
| 55 bool WorkerPermissionClientProxy::requestFileSystemAccessSync() { | 45 bool WorkerPermissionClientProxy::requestFileSystemAccessSync() { |
| 56 if (is_unique_origin_) | 46 if (is_unique_origin_) |
| 57 return false; | 47 return false; |
| 58 | 48 |
| 59 bool result = false; | 49 bool result = false; |
| 60 sync_message_filter_->Send(new ChromeViewHostMsg_RequestFileSystemAccessSync( | 50 sync_message_filter_->Send(new ChromeViewHostMsg_RequestFileSystemAccessSync( |
| 61 routing_id_, document_origin_url_, top_frame_origin_url_, &result)); | 51 routing_id_, document_origin_url_, top_frame_origin_url_, &result)); |
| 62 return result; | 52 return result; |
| 63 } | 53 } |
| 64 | 54 |
| 65 bool WorkerPermissionClientProxy::allowIndexedDB( | 55 bool WorkerPermissionClientProxy::allowIndexedDB( |
| 66 const blink::WebString& name) { | 56 const blink::WebString& name) { |
| 67 if (is_unique_origin_) | 57 if (is_unique_origin_) |
| 68 return false; | 58 return false; |
| 69 | 59 |
| 70 bool result = false; | 60 bool result = false; |
| 71 sync_message_filter_->Send(new ChromeViewHostMsg_AllowIndexedDB( | 61 sync_message_filter_->Send(new ChromeViewHostMsg_AllowIndexedDB( |
| 72 routing_id_, document_origin_url_, top_frame_origin_url_, name, &result)); | 62 routing_id_, document_origin_url_, top_frame_origin_url_, name, &result)); |
| 73 return result; | 63 return result; |
| 74 } | 64 } |
| OLD | NEW |