Drive: Add BatchableRequest subclass.
[chromium-blink-merge.git] / chromecast / browser / cast_permission_manager.cc
blob54352c0db790681744ece841ab05da7a810ab02b
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 {
12 namespace shell {
14 CastPermissionManager::CastPermissionManager()
15 : content::PermissionManager() {
18 CastPermissionManager::~CastPermissionManager() {
21 void CastPermissionManager::RequestPermission(
22 content::PermissionType permission,
23 content::WebContents* web_contents,
24 int request_id,
25 const GURL& origin,
26 bool user_gesture,
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::WebContents* web_contents,
35 int request_id,
36 const GURL& origin) {
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) {
64 return -1;
67 void CastPermissionManager::UnsubscribePermissionStatusChange(
68 int subscription_id) {
71 } // namespace shell
72 } // namespace chromecast