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 b6bb3b49cec3a5920e6f81776f87657e465b261a..02345508304b82eee9c2c9597f1c7fffab895dae 100644 |
--- a/chrome/browser/guestview/webview/webview_guest.h |
+++ b/chrome/browser/guestview/webview/webview_guest.h |
@@ -73,7 +73,7 @@ class WebViewGuest : public GuestView, |
const std::string& error_type) OVERRIDE; |
virtual void RendererResponsive() OVERRIDE; |
virtual void RendererUnresponsive() OVERRIDE; |
- virtual bool RequestPermission( |
+ virtual void RequestPermission( |
BrowserPluginPermissionType permission_type, |
const base::DictionaryValue& request_info, |
const PermissionResponseCallback& callback, |
@@ -108,6 +108,21 @@ class WebViewGuest : public GuestView, |
// Reload the guest. |
void Reload(); |
+ // Requests Geolocation Permission from the embedder. |
+ void RequestGeolocationPermission(int bridge_id, |
+ 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); |
+ |
enum PermissionResponseAction { |
DENY, |
ALLOW, |
@@ -219,6 +234,17 @@ class WebViewGuest : public GuestView, |
void InjectChromeVoxIfNeeded(content::RenderViewHost* render_view_host); |
+ // Bridge IDs correspond to a geolocation request. This method will remove |
+ // the bookkeeping for a particular geolocation request associated with the |
+ // provided |bridge_id|. It returns the request ID of the geolocation request. |
+ int RemoveBridgeID(int bridge_id); |
+ |
+ int RequestPermissionInternal( |
+ BrowserPluginPermissionType permission_type, |
+ const base::DictionaryValue& request_info, |
+ const PermissionResponseCallback& callback, |
+ bool allowed_by_default); |
+ |
ObserverList<extensions::TabHelper::ScriptExecutionObserver> |
script_observers_; |
scoped_ptr<extensions::ScriptExecutor> script_executor_; |
@@ -260,6 +286,8 @@ class WebViewGuest : public GuestView, |
accessibility_subscription_; |
#endif |
+ std::map<int, int> bridge_id_to_request_id_map_; |
+ |
DISALLOW_COPY_AND_ASSIGN(WebViewGuest); |
}; |