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"
10 #include "components/content_settings/core/common/content_settings.h"
17 class PermissionRequestID
;
20 // Chrome extensions specific portions of GeolocationPermissionContext.
21 class GeolocationPermissionContextExtensions
{
23 explicit GeolocationPermissionContextExtensions(Profile
* profile
);
24 ~GeolocationPermissionContextExtensions();
26 // Returns true if the permission request was handled. In which case,
27 // |permission_set| will be set to true if the permission changed, and the
28 // permission has been set to |new_permission|.
29 bool RequestPermission(content::WebContents
* web_contents
,
30 const PermissionRequestID
& request_id
,
32 const GURL
& requesting_frame
,
34 const base::Callback
<void(ContentSetting
)>& callback
,
36 bool* new_permission
);
38 // Returns true if the cancellation request was handled.
39 bool CancelPermissionRequest(content::WebContents
* web_contents
,
45 DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContextExtensions
);
48 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_EXTENSIONS_H_