Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2612)

Unified Diff: chrome/browser/guest_view/web_view/web_view_guest.h

Issue 306473012: Plumb file system permission into WebviewGuest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move permission requests to WebViewGuest. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 f7b6d2ba0a7ee606a241e1cb30202a32031a3d32..d6c0ab3e33aa24d99b094af1cf986ed47306a93b 100644
--- a/chrome/browser/guest_view/web_view/web_view_guest.h
+++ b/chrome/browser/guest_view/web_view/web_view_guest.h
@@ -16,6 +16,7 @@
#include "chrome/common/extensions/api/webview.h"
#include "content/public/browser/javascript_dialog_manager.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents_observer.h"
#include "third_party/WebKit/public/web/WebFindOptions.h"
@@ -182,6 +183,14 @@ class WebViewGuest : public GuestView<WebViewGuest>,
void CancelGeolocationPermissionRequest(int bridge_id);
+ void RequestFileSystemPermission(const GURL& url,
+ const base::Callback<void(bool)>& callback);
+
+ 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,
@@ -243,6 +252,18 @@ class WebViewGuest : public GuestView<WebViewGuest>,
return script_executor_.get();
}
+ static void FileSystemAccessedAsync(int render_process_id,
+ int render_frame_id,
+ int request_id,
+ const GURL& url,
+ bool blocked_by_policy);
+
+ static void FileSystemAccessedSyncDelayReply(int render_process_id,
+ int render_frame_id,
+ const GURL& url,
+ IPC::Message* reply_msg,
+ bool blocked_by_policy);
+
private:
virtual ~WebViewGuest();
@@ -265,6 +286,21 @@ class WebViewGuest : public GuestView<WebViewGuest>,
static scoped_ptr<base::ListValue> MenuModelToValue(
const ui::SimpleMenuModel& menu_model);
+ static void FileSystemAccessedAsyncInternal(int render_process_id,
+ int render_frame_id,
+ int request_id,
+ const GURL& url,
+ bool blocked_by_policy);
+
+ static void FileSystemAccessedSyncDelayReplyInternal(int render_process_id,
+ int render_frame_id,
+ const GURL& url,
+ IPC::Message* reply_msg,
+ bool blocked_by_policy);
+
+ static WebViewGuest* GetWebViewGuest(int render_process_id,
+ int render_frame_id);
+
// WebContentsObserver implementation.
virtual void DidCommitProvisionalLoadForFrame(
int64 frame_id,

Powered by Google App Engine
This is Rietveld 408576698