| 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 "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "content/public/browser/permission_type.h" | 9 #include "content/public/browser/permission_type.h" |
| 10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 79 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 80 if ((permission == PermissionType::AUDIO_CAPTURE || | 80 if ((permission == PermissionType::AUDIO_CAPTURE || |
| 81 permission == PermissionType::VIDEO_CAPTURE) && | 81 permission == PermissionType::VIDEO_CAPTURE) && |
| 82 command_line->HasSwitch(switches::kUseFakeDeviceForMediaStream) && | 82 command_line->HasSwitch(switches::kUseFakeDeviceForMediaStream) && |
| 83 command_line->HasSwitch(switches::kUseFakeUIForMediaStream)) { | 83 command_line->HasSwitch(switches::kUseFakeUIForMediaStream)) { |
| 84 return blink::mojom::PermissionStatus::GRANTED; | 84 return blink::mojom::PermissionStatus::GRANTED; |
| 85 } | 85 } |
| 86 return blink::mojom::PermissionStatus::DENIED; | 86 return blink::mojom::PermissionStatus::DENIED; |
| 87 } | 87 } |
| 88 | 88 |
| 89 void ShellPermissionManager::RegisterPermissionUsage( | |
| 90 PermissionType permission, | |
| 91 const GURL& requesting_origin, | |
| 92 const GURL& embedding_origin) { | |
| 93 } | |
| 94 | |
| 95 int ShellPermissionManager::SubscribePermissionStatusChange( | 89 int ShellPermissionManager::SubscribePermissionStatusChange( |
| 96 PermissionType permission, | 90 PermissionType permission, |
| 97 const GURL& requesting_origin, | 91 const GURL& requesting_origin, |
| 98 const GURL& embedding_origin, | 92 const GURL& embedding_origin, |
| 99 const base::Callback<void(blink::mojom::PermissionStatus)>& callback) { | 93 const base::Callback<void(blink::mojom::PermissionStatus)>& callback) { |
| 100 return kNoPendingOperation; | 94 return kNoPendingOperation; |
| 101 } | 95 } |
| 102 | 96 |
| 103 void ShellPermissionManager::UnsubscribePermissionStatusChange( | 97 void ShellPermissionManager::UnsubscribePermissionStatusChange( |
| 104 int subscription_id) { | 98 int subscription_id) { |
| 105 } | 99 } |
| 106 | 100 |
| 107 } // namespace content | 101 } // namespace content |
| OLD | NEW |