Index: chrome/browser/guestview/webview/webview_guest.h |
diff --git a/chrome/browser/guestview/webview/webview_guest.h b/chrome/browser/guestview/webview/webview_guest.h |
index a13e306787ab10c725370ae98f79d0daea047c74..c6a7abd454de7fa93705157d5a3222d02614a67d 100644 |
--- a/chrome/browser/guestview/webview/webview_guest.h |
+++ b/chrome/browser/guestview/webview/webview_guest.h |
@@ -50,6 +50,10 @@ class WebViewGuest : public GuestView, |
const content::NativeWebKeyboardEvent& event) OVERRIDE; |
virtual void RendererResponsive() OVERRIDE; |
virtual void RendererUnresponsive() OVERRIDE; |
+ virtual bool RequestPermission( |
+ BrowserPluginPermissionType permission_type, |
+ const base::DictionaryValue& request_info, |
+ const PermissionResponseCallback& callback) OVERRIDE; |
// NotificationObserver implementation. |
virtual void Observe(int type, |
@@ -63,6 +67,12 @@ class WebViewGuest : public GuestView, |
// Reload the guest. |
void Reload(); |
+ // Responds to the permission request |request_id| with |should_allow| and |
+ // |user_input|. |
lazyboy
2013/08/05 09:26:58
Also say what the return value is
Fady Samuel
2013/08/06 07:14:40
Done.
|
+ bool SetPermission(int request_id, |
+ bool should_allow, |
+ const std::string& user_input); |
+ |
// Stop loading the guest. |
void Stop(); |
@@ -121,6 +131,14 @@ class WebViewGuest : public GuestView, |
content::NotificationRegistrar notification_registrar_; |
+ // A counter to generate a unique request id for a permission request. |
+ // We only need the ids to be unique for a given WebViewGuest. |
+ int next_permission_request_id_; |
+ |
+ // A map to store the callback for a request keyed by the request's id. |
+ typedef std::map<int, PermissionResponseCallback> RequestMap; |
+ RequestMap pending_permission_requests_; |
+ |
DISALLOW_COPY_AND_ASSIGN(WebViewGuest); |
}; |