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 "chromecast/browser/cast_permission_manager.h"
7 #include "base/callback.h"
8 #include "base/logging.h"
9 #include "content/public/browser/permission_type.h"
11 namespace chromecast
{
14 CastPermissionManager::CastPermissionManager()
15 : content::PermissionManager() {
18 CastPermissionManager::~CastPermissionManager() {
21 void CastPermissionManager::RequestPermission(
22 content::PermissionType permission
,
23 content::RenderFrameHost
* render_frame_host
,
27 const base::Callback
<void(content::PermissionStatus
)>& callback
) {
28 LOG(INFO
) << __FUNCTION__
<< ": " << static_cast<int>(permission
);
29 callback
.Run(content::PermissionStatus::PERMISSION_STATUS_GRANTED
);
32 void CastPermissionManager::CancelPermissionRequest(
33 content::PermissionType permission
,
34 content::RenderFrameHost
* render_frame_host
,
39 void CastPermissionManager::ResetPermission(
40 content::PermissionType permission
,
41 const GURL
& requesting_origin
,
42 const GURL
& embedding_origin
) {
45 content::PermissionStatus
CastPermissionManager::GetPermissionStatus(
46 content::PermissionType permission
,
47 const GURL
& requesting_origin
,
48 const GURL
& embedding_origin
) {
49 LOG(INFO
) << __FUNCTION__
<< ": " << static_cast<int>(permission
);
50 return content::PermissionStatus::PERMISSION_STATUS_GRANTED
;
53 void CastPermissionManager::RegisterPermissionUsage(
54 content::PermissionType permission
,
55 const GURL
& requesting_origin
,
56 const GURL
& embedding_origin
) {
59 int CastPermissionManager::SubscribePermissionStatusChange(
60 content::PermissionType permission
,
61 const GURL
& requesting_origin
,
62 const GURL
& embedding_origin
,
63 const base::Callback
<void(content::PermissionStatus
)>& callback
) {
67 void CastPermissionManager::UnsubscribePermissionStatusChange(
68 int subscription_id
) {
72 } // namespace chromecast