Chromium Code Reviews| Index: chrome/renderer/worker_permission_client_proxy.cc |
| diff --git a/chrome/renderer/worker_permission_client_proxy.cc b/chrome/renderer/worker_permission_client_proxy.cc |
| index 7d8a65e87ea92419838ee79d97a2ed33ebdd0744..3de69db71d8012c630f9309f62c00ccb7917f593 100644 |
| --- a/chrome/renderer/worker_permission_client_proxy.cc |
| +++ b/chrome/renderer/worker_permission_client_proxy.cc |
| @@ -3,10 +3,12 @@ |
| // found in the LICENSE file. |
| #include "chrome/common/render_messages.h" |
| +#include "chrome/renderer/permission_request_map.h" |
| #include "chrome/renderer/worker_permission_client_proxy.h" |
| #include "content/public/renderer/render_frame.h" |
| #include "content/public/renderer/render_thread.h" |
| #include "ipc/ipc_sync_message_filter.h" |
| +#include "third_party/WebKit/public/platform/WebPermissionCallbacks.h" |
| #include "third_party/WebKit/public/web/WebDocument.h" |
| #include "third_party/WebKit/public/web/WebFrame.h" |
| #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
| @@ -51,6 +53,19 @@ bool WorkerPermissionClientProxy::allowFileSystem() { |
| return result; |
| } |
| +void WorkerPermissionClientProxy::requestFileSystemAccess( |
| + const blink::WebPermissionCallbacks& callbacks) { |
| + bool result = false; |
| + sync_message_filter_->Send(new ChromeViewHostMsg_AllowFileSystem( |
| + routing_id_, document_origin_url_, top_frame_origin_url_, &result)); |
| + blink::WebPermissionCallbacks permission_callbacks(callbacks); |
| + if (result) { |
| + permission_callbacks.doAllow(); |
| + } else { |
| + permission_callbacks.doDeny(); |
| + } |
|
kinuko
2014/03/05 08:35:44
no need of { } for single-line body
Fady Samuel
2014/03/06 18:38:25
Switched to early exit.
|
| +} |
| + |
| bool WorkerPermissionClientProxy::allowIndexedDB( |
| const blink::WebString& name) { |
| if (is_unique_origin_) |