| 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 87e26fe3b5749c3cd17646ad6b23a19ef465ecab..480243648fa35e5dd919370d4b93412a43c79841 100644
|
| --- a/chrome/browser/guest_view/web_view/web_view_guest.h
|
| +++ b/chrome/browser/guest_view/web_view/web_view_guest.h
|
| @@ -175,35 +175,11 @@ class WebViewGuest : public GuestView<WebViewGuest>,
|
| const GURL& requesting_frame,
|
| bool user_gesture,
|
| const base::Callback<void(bool)>& callback);
|
| -
|
| - void OnWebViewGeolocationPermissionResponse(
|
| - int bridge_id,
|
| - bool user_gesture,
|
| - const base::Callback<void(bool)>& callback,
|
| - bool allow,
|
| - const std::string& user_input);
|
| -
|
| void CancelGeolocationPermissionRequest(int bridge_id);
|
|
|
| - void OnWebViewMediaPermissionResponse(
|
| - const content::MediaStreamRequest& request,
|
| - const content::MediaResponseCallback& callback,
|
| - bool allow,
|
| - const std::string& user_input);
|
| -
|
| - void OnWebViewDownloadPermissionResponse(
|
| - const base::Callback<void(bool)>& callback,
|
| - bool allow,
|
| - const std::string& user_input);
|
| -
|
| - void OnWebViewPointerLockPermissionResponse(
|
| - const base::Callback<void(bool)>& callback,
|
| - bool allow,
|
| - const std::string& user_input);
|
| -
|
| - void OnWebViewNewWindowResponse(int new_window_instance_id,
|
| - bool allow,
|
| - const std::string& user_input);
|
| + void RequestFileSystemPermission(const GURL& url,
|
| + bool allowed_by_default,
|
| + const base::Callback<void(bool)>& callback);
|
|
|
| enum PermissionResponseAction {
|
| DENY,
|
| @@ -246,6 +222,39 @@ class WebViewGuest : public GuestView<WebViewGuest>,
|
| return script_executor_.get();
|
| }
|
|
|
| + // 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:
|
| + // - 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
|
| + // perform an explicit action.
|
| + // 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);
|
| +
|
| + // 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
|
| + // 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
|
| + // perform an explicit action.
|
| + // 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);
|
| +
|
| private:
|
| virtual ~WebViewGuest();
|
|
|
| @@ -268,6 +277,50 @@ class WebViewGuest : public GuestView<WebViewGuest>,
|
| static scoped_ptr<base::ListValue> MenuModelToValue(
|
| const ui::SimpleMenuModel& menu_model);
|
|
|
| + void OnWebViewGeolocationPermissionResponse(
|
| + int bridge_id,
|
| + bool user_gesture,
|
| + const base::Callback<void(bool)>& callback,
|
| + bool allow,
|
| + const std::string& user_input);
|
| +
|
| + void OnWebViewFileSystemPermissionResponse(
|
| + const base::Callback<void(bool)>& callback,
|
| + bool allow,
|
| + const std::string& user_input);
|
| +
|
| + void OnWebViewMediaPermissionResponse(
|
| + const content::MediaStreamRequest& request,
|
| + const content::MediaResponseCallback& callback,
|
| + bool allow,
|
| + const std::string& user_input);
|
| +
|
| + void OnWebViewDownloadPermissionResponse(
|
| + const base::Callback<void(bool)>& callback,
|
| + bool allow,
|
| + const std::string& user_input);
|
| +
|
| + void OnWebViewPointerLockPermissionResponse(
|
| + const base::Callback<void(bool)>& callback,
|
| + bool allow,
|
| + const std::string& user_input);
|
| +
|
| + void OnWebViewNewWindowResponse(int new_window_instance_id,
|
| + 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);
|
| +
|
| // WebContentsObserver implementation.
|
| virtual void DidCommitProvisionalLoadForFrame(
|
| int64 frame_id,
|
|
|