| Index: chrome/browser/guest_view/web_view/web_view_guest.h
|
| diff --git a/chrome/browser/guest_view/web_view/web_view_guest.h b/chrome/browser/guest_view/web_view/web_view_guest.h
|
| index b79f9ef6f6be740e403cf473a2050f515ca66d80..7ccd823fe48eac2d678912fb40eb314d58c63005 100644
|
| --- a/chrome/browser/guest_view/web_view/web_view_guest.h
|
| +++ b/chrome/browser/guest_view/web_view/web_view_guest.h
|
| @@ -245,8 +245,9 @@ class WebViewGuest : public GuestView<WebViewGuest>,
|
| }
|
|
|
| // Called when file system access is requested by the guest content using the
|
| - // asynchronous HTML5 file system API. The request is plumbed through the
|
| - // <webview> permission request API. The request will be:
|
| + // HTML5 file system API in main thread, or a worker thread.
|
| + // The request is plumbed through the <webview> permission request API. The
|
| + // request will be:
|
| // - Allowed if the embedder explicitly allowed it.
|
| // - Denied if the embedder explicitly denied.
|
| // - Determined by the guest's content settings if the embedder does not
|
| @@ -254,15 +255,15 @@ class WebViewGuest : public GuestView<WebViewGuest>,
|
| // If access was blocked due to the page's content settings,
|
| // |blocked_by_policy| should be true, and this function should invoke
|
| // OnContentBlocked.
|
| - static void FileSystemAccessedAsync(int render_process_id,
|
| - int render_frame_id,
|
| - int request_id,
|
| - const GURL& url,
|
| - bool blocked_by_policy);
|
| + static void FileSystemAccessed(int render_process_id,
|
| + int render_frame_id,
|
| + const GURL& url,
|
| + bool blocked_by_policy,
|
| + base::Callback<void(bool)> callback);
|
|
|
| // Called when file system access is requested by the guest content using the
|
| - // synchronous HTML5 file system API in a worker thread or shared worker. The
|
| - // request is plumbed through the <webview> permission request API. The
|
| + // HTML5 file system API from shared workers.
|
| + // The request is plumbed through the <webview> permission request API. The
|
| // request will be:
|
| // - Allowed if the embedder explicitly allowed it.
|
| // - Denied if the embedder explicitly denied.
|
| @@ -271,11 +272,14 @@ class WebViewGuest : public GuestView<WebViewGuest>,
|
| // If access was blocked due to the page's content settings,
|
| // |blocked_by_policy| should be true, and this function should invoke
|
| // OnContentBlocked.
|
| - static void FileSystemAccessedSync(int render_process_id,
|
| - int render_frame_id,
|
| - const GURL& url,
|
| - bool blocked_by_policy,
|
| - IPC::Message* reply_msg);
|
| + // Different from FileSystemAccessed, this function will only request
|
| + // permission, but won't call TabSpecificContentSettings::FileSystemAccessed.
|
| + static void RequestFileSystemAccessPermission(
|
| + int render_process_id,
|
| + int render_frame_id,
|
| + const GURL& url,
|
| + bool blocked_by_policy,
|
| + base::Callback<void(bool)> callback);
|
|
|
| private:
|
| virtual ~WebViewGuest();
|
| @@ -331,17 +335,12 @@ class WebViewGuest : public GuestView<WebViewGuest>,
|
| bool allow,
|
| const std::string& user_input);
|
|
|
| - static void FileSystemAccessedAsyncResponse(int render_process_id,
|
| - int render_frame_id,
|
| - int request_id,
|
| - const GURL& url,
|
| - bool allowed);
|
| -
|
| - static void FileSystemAccessedSyncResponse(int render_process_id,
|
| - int render_frame_id,
|
| - const GURL& url,
|
| - IPC::Message* reply_msg,
|
| - bool allowed);
|
| + static void FileSystemAccessedResponse(
|
| + int render_process_id,
|
| + int render_frame_id,
|
| + const GURL& url,
|
| + base::Callback<void(bool)> callback,
|
| + bool allowed);
|
|
|
| // WebContentsObserver implementation.
|
| virtual void DidCommitProvisionalLoadForFrame(
|
|
|