Index: content/public/browser/content_browser_client.h |
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h |
index 65a5abbee97179d557c81c8985025720f92c8a07..4faf340eb63d36f99b49e4a04393924e4bccd904 100644 |
--- a/content/public/browser/content_browser_client.h |
+++ b/content/public/browser/content_browser_client.h |
@@ -109,6 +109,19 @@ struct Referrer; |
struct ShowDesktopNotificationHostMsgParams; |
struct WebPreferences; |
+ |
+enum PermissionType { |
+ PERMISSION_UNKNOWN = 0, |
+ PERMISSION_MIDI_SYSEX = 1, |
+ PERMISSION_PUSH_MESSAGING = 2, |
+ PERMISSION_NOTIFICATIONS = 3, |
+ PERMISSION_GEOLOCATION = 4, |
+ PERMISSION_PROTECTED_MEDIA = 5, |
+ |
+ // Always keep this at the end. |
+ PERMISSION_NUM, |
+}; |
+ |
// A mapping from the scheme name to the protocol handler that services its |
// content. |
typedef std::map< |
@@ -435,18 +448,17 @@ class CONTENT_EXPORT ContentBrowserClient { |
scoped_ptr<DesktopNotificationDelegate> delegate, |
base::Closure* cancel_callback) {} |
- // The renderer is requesting permission to use Geolocation. When the answer |
- // to a permission request has been determined, |result_callback| should be |
- // called with the result. If |cancel_callback| is non-null, it's set to a |
- // callback which can be used to cancel the permission request. |
- virtual void RequestGeolocationPermission( |
+ virtual void RequestPermission( |
+ PermissionType permission, |
WebContents* web_contents, |
int bridge_id, |
const GURL& requesting_frame, |
bool user_gesture, |
const base::Callback<void(bool)>& result_callback); |
- virtual void CancelGeolocationPermissionRequest( |
+ |
+ virtual void CancelPermissionRequest( |
+ PermissionType permission, |
WebContents* web_contents, |
int bridge_id, |
const GURL& requesting_frame); |
@@ -456,26 +468,6 @@ class CONTENT_EXPORT ContentBrowserClient { |
const GURL& frame_url, |
const GURL& main_frame_url) {} |
- // Requests a permission to use system exclusive messages in MIDI events. |
- // |result_callback| will be invoked when the request is resolved. If |
- // |cancel_callback| is non-null, it's set to a callback which can be used to |
- // cancel the permission request. |
- virtual void RequestMidiSysExPermission( |
- WebContents* web_contents, |
- int bridge_id, |
- const GURL& requesting_frame, |
- bool user_gesture, |
- base::Callback<void(bool)> result_callback, |
- base::Closure* cancel_callback); |
- |
- // Request permission to access protected media identifier. |result_callback |
- // will tell whether it's permitted. If |cancel_callback| is non-null, it's |
- // set to a callback which can be used to cancel the permission request. |
- virtual void RequestProtectedMediaIdentifierPermission( |
- WebContents* web_contents, |
- const GURL& origin, |
- base::Callback<void(bool)> result_callback, |
- base::Closure* cancel_callback); |
// Returns true if the given page is allowed to open a window of the given |
// type. If true is returned, |no_javascript_access| will indicate whether |