OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chromecast/browser/cast_permission_manager.h" | 5 #include "chromecast/browser/cast_permission_manager.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "content/public/browser/permission_type.h" | 9 #include "content/public/browser/permission_type.h" |
10 | 10 |
11 namespace chromecast { | 11 namespace chromecast { |
12 namespace shell { | 12 namespace shell { |
13 | 13 |
14 CastPermissionManager::CastPermissionManager() | 14 CastPermissionManager::CastPermissionManager() |
15 : content::PermissionManager() { | 15 : content::PermissionManager() { |
16 } | 16 } |
17 | 17 |
18 CastPermissionManager::~CastPermissionManager() { | 18 CastPermissionManager::~CastPermissionManager() { |
19 } | 19 } |
20 | 20 |
21 void CastPermissionManager::RequestPermission( | 21 void CastPermissionManager::RequestPermission( |
22 content::PermissionType permission, | 22 content::PermissionType permission, |
23 content::WebContents* web_contents, | 23 content::RenderFrameHost* render_frame_host, |
24 int request_id, | 24 int request_id, |
25 const GURL& origin, | 25 const GURL& origin, |
26 bool user_gesture, | 26 bool user_gesture, |
27 const base::Callback<void(content::PermissionStatus)>& callback) { | 27 const base::Callback<void(content::PermissionStatus)>& callback) { |
28 LOG(INFO) << __FUNCTION__ << ": " << static_cast<int>(permission); | 28 LOG(INFO) << __FUNCTION__ << ": " << static_cast<int>(permission); |
29 callback.Run(content::PermissionStatus::PERMISSION_STATUS_GRANTED); | 29 callback.Run(content::PermissionStatus::PERMISSION_STATUS_GRANTED); |
30 } | 30 } |
31 | 31 |
32 void CastPermissionManager::CancelPermissionRequest( | 32 void CastPermissionManager::CancelPermissionRequest( |
33 content::PermissionType permission, | 33 content::PermissionType permission, |
34 content::WebContents* web_contents, | 34 content::RenderFrameHost* render_frame_host, |
35 int request_id, | 35 int request_id, |
36 const GURL& origin) { | 36 const GURL& origin) { |
37 } | 37 } |
38 | 38 |
39 void CastPermissionManager::ResetPermission( | 39 void CastPermissionManager::ResetPermission( |
40 content::PermissionType permission, | 40 content::PermissionType permission, |
41 const GURL& requesting_origin, | 41 const GURL& requesting_origin, |
42 const GURL& embedding_origin) { | 42 const GURL& embedding_origin) { |
43 } | 43 } |
44 | 44 |
(...skipping 18 matching lines...) Expand all Loading... |
63 const base::Callback<void(content::PermissionStatus)>& callback) { | 63 const base::Callback<void(content::PermissionStatus)>& callback) { |
64 return -1; | 64 return -1; |
65 } | 65 } |
66 | 66 |
67 void CastPermissionManager::UnsubscribePermissionStatusChange( | 67 void CastPermissionManager::UnsubscribePermissionStatusChange( |
68 int subscription_id) { | 68 int subscription_id) { |
69 } | 69 } |
70 | 70 |
71 } // namespace shell | 71 } // namespace shell |
72 } // namespace chromecast | 72 } // namespace chromecast |
OLD | NEW |