1 // Copyright 2015 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 #include "content/shell/browser/shell_permission_manager.h"
7 #include "base/callback.h"
8 #include "content/public/browser/permission_type.h"
12 ShellPermissionManager::ShellPermissionManager()
13 : PermissionManager() {
16 ShellPermissionManager::~ShellPermissionManager() {
19 void ShellPermissionManager::RequestPermission(
20 PermissionType permission
,
21 RenderFrameHost
* render_frame_host
,
23 const GURL
& requesting_origin
,
25 const base::Callback
<void(PermissionStatus
)>& callback
) {
26 callback
.Run(permission
== PermissionType::GEOLOCATION
27 ? PERMISSION_STATUS_GRANTED
: PERMISSION_STATUS_DENIED
);
30 void ShellPermissionManager::CancelPermissionRequest(
31 PermissionType permission
,
32 RenderFrameHost
* render_frame_host
,
34 const GURL
& requesting_origin
) {
37 void ShellPermissionManager::ResetPermission(
38 PermissionType permission
,
39 const GURL
& requesting_origin
,
40 const GURL
& embedding_origin
) {
43 PermissionStatus
ShellPermissionManager::GetPermissionStatus(
44 PermissionType permission
,
45 const GURL
& requesting_origin
,
46 const GURL
& embedding_origin
) {
47 return PERMISSION_STATUS_DENIED
;
50 void ShellPermissionManager::RegisterPermissionUsage(
51 PermissionType permission
,
52 const GURL
& requesting_origin
,
53 const GURL
& embedding_origin
) {
56 int ShellPermissionManager::SubscribePermissionStatusChange(
57 PermissionType permission
,
58 const GURL
& requesting_origin
,
59 const GURL
& embedding_origin
,
60 const base::Callback
<void(PermissionStatus
)>& callback
) {
64 void ShellPermissionManager::UnsubscribePermissionStatusChange(
65 int subscription_id
) {
68 } // namespace content