1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_EXTENSIONS_H_
6 #define CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_EXTENSIONS_H_
8 #include "base/callback_forward.h"
9 #include "base/macros.h"
16 class PermissionRequestID
;
19 // Chrome extensions specific portions of GeolocationPermissionContext.
20 class GeolocationPermissionContextExtensions
{
22 explicit GeolocationPermissionContextExtensions(Profile
* profile
);
23 ~GeolocationPermissionContextExtensions();
25 // Returns true if the permission request was handled. In which case,
26 // |permission_set| will be set to true if the permission changed, and the
27 // permission has been set to |new_permission|.
28 bool RequestPermission(content::WebContents
* web_contents
,
29 const PermissionRequestID
& request_id
,
31 const GURL
& requesting_frame
,
33 base::Callback
<void(bool)> callback
,
35 bool* new_permission
);
37 // Returns true if the cancellation request was handled.
38 bool CancelPermissionRequest(content::WebContents
* web_contents
,
44 DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContextExtensions
);
47 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_EXTENSIONS_H_