| 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 "content/shell/browser/shell_permission_manager.h" | 5 #include "content/shell/browser/shell_permission_manager.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "content/public/browser/permission_type.h" | 8 #include "content/public/browser/permission_type.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 | 11 |
| 12 ShellPermissionManager::ShellPermissionManager() | 12 ShellPermissionManager::ShellPermissionManager() |
| 13 : PermissionManager() { | 13 : PermissionManager() { |
| 14 } | 14 } |
| 15 | 15 |
| 16 ShellPermissionManager::~ShellPermissionManager() { | 16 ShellPermissionManager::~ShellPermissionManager() { |
| 17 } | 17 } |
| 18 | 18 |
| 19 void ShellPermissionManager::RequestPermission( | 19 int ShellPermissionManager::RequestPermission( |
| 20 PermissionType permission, | 20 PermissionType permission, |
| 21 RenderFrameHost* render_frame_host, | 21 RenderFrameHost* render_frame_host, |
| 22 int request_id, | |
| 23 const GURL& requesting_origin, | 22 const GURL& requesting_origin, |
| 24 bool user_gesture, | 23 bool user_gesture, |
| 25 const base::Callback<void(PermissionStatus)>& callback) { | 24 const base::Callback<void(PermissionStatus)>& callback) { |
| 26 callback.Run(permission == PermissionType::GEOLOCATION | 25 callback.Run(permission == PermissionType::GEOLOCATION |
| 27 ? PERMISSION_STATUS_GRANTED : PERMISSION_STATUS_DENIED); | 26 ? PERMISSION_STATUS_GRANTED : PERMISSION_STATUS_DENIED); |
| 27 return -1; |
| 28 } | 28 } |
| 29 | 29 |
| 30 void ShellPermissionManager::CancelPermissionRequest( | 30 void ShellPermissionManager::CancelPermissionRequest( |
| 31 PermissionType permission, | |
| 32 RenderFrameHost* render_frame_host, | 31 RenderFrameHost* render_frame_host, |
| 33 int request_id, | 32 int request_id) { |
| 34 const GURL& requesting_origin) { | |
| 35 } | 33 } |
| 36 | 34 |
| 37 void ShellPermissionManager::ResetPermission( | 35 void ShellPermissionManager::ResetPermission( |
| 38 PermissionType permission, | 36 PermissionType permission, |
| 39 const GURL& requesting_origin, | 37 const GURL& requesting_origin, |
| 40 const GURL& embedding_origin) { | 38 const GURL& embedding_origin) { |
| 41 } | 39 } |
| 42 | 40 |
| 43 PermissionStatus ShellPermissionManager::GetPermissionStatus( | 41 PermissionStatus ShellPermissionManager::GetPermissionStatus( |
| 44 PermissionType permission, | 42 PermissionType permission, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 59 const GURL& embedding_origin, | 57 const GURL& embedding_origin, |
| 60 const base::Callback<void(PermissionStatus)>& callback) { | 58 const base::Callback<void(PermissionStatus)>& callback) { |
| 61 return -1; | 59 return -1; |
| 62 } | 60 } |
| 63 | 61 |
| 64 void ShellPermissionManager::UnsubscribePermissionStatusChange( | 62 void ShellPermissionManager::UnsubscribePermissionStatusChange( |
| 65 int subscription_id) { | 63 int subscription_id) { |
| 66 } | 64 } |
| 67 | 65 |
| 68 } // namespace content | 66 } // namespace content |
| OLD | NEW |