Chromium Code Reviews| 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 "android_webview/browser/aw_permission_manager.h" | 5 #include "android_webview/browser/aw_permission_manager.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "android_webview/browser/aw_browser_permission_request_delegate.h" | 9 #include "android_webview/browser/aw_browser_permission_request_delegate.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 201 origin, base::Bind(&CallbackPermisisonStatusWrapper, | 201 origin, base::Bind(&CallbackPermisisonStatusWrapper, |
| 202 result_cache_->GetWeakPtr(), callback, permission, | 202 result_cache_->GetWeakPtr(), callback, permission, |
| 203 origin, embedding_origin)); | 203 origin, embedding_origin)); |
| 204 break; | 204 break; |
| 205 case PermissionType::MIDI_SYSEX: | 205 case PermissionType::MIDI_SYSEX: |
| 206 delegate->RequestMIDISysexPermission( | 206 delegate->RequestMIDISysexPermission( |
| 207 origin, base::Bind(&CallbackPermisisonStatusWrapper, | 207 origin, base::Bind(&CallbackPermisisonStatusWrapper, |
| 208 result_cache_->GetWeakPtr(), callback, permission, | 208 result_cache_->GetWeakPtr(), callback, permission, |
| 209 origin, embedding_origin)); | 209 origin, embedding_origin)); |
| 210 break; | 210 break; |
| 211 case PermissionType::AUDIO_RECORDING: | |
|
xhwang
2015/08/27 19:25:17
It seems to me that
AUDIO_RECORDING == MIC
VIDEO_
| |
| 212 case PermissionType::VIDEO_RECORDING: | |
| 211 case PermissionType::NOTIFICATIONS: | 213 case PermissionType::NOTIFICATIONS: |
| 212 case PermissionType::PUSH_MESSAGING: | 214 case PermissionType::PUSH_MESSAGING: |
| 213 case PermissionType::DURABLE_STORAGE: | 215 case PermissionType::DURABLE_STORAGE: |
| 214 NOTIMPLEMENTED() << "RequestPermission is not implemented for " | 216 NOTIMPLEMENTED() << "RequestPermission is not implemented for " |
| 215 << static_cast<int>(permission); | 217 << static_cast<int>(permission); |
| 216 callback.Run(content::PERMISSION_STATUS_DENIED); | 218 callback.Run(content::PERMISSION_STATUS_DENIED); |
| 217 break; | 219 break; |
| 218 case PermissionType::MIDI: | 220 case PermissionType::MIDI: |
| 219 callback.Run(content::PERMISSION_STATUS_GRANTED); | 221 callback.Run(content::PERMISSION_STATUS_GRANTED); |
| 220 break; | 222 break; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 252 break; | 254 break; |
| 253 case PermissionType::PROTECTED_MEDIA_IDENTIFIER: | 255 case PermissionType::PROTECTED_MEDIA_IDENTIFIER: |
| 254 delegate->CancelProtectedMediaIdentifierPermissionRequests(origin); | 256 delegate->CancelProtectedMediaIdentifierPermissionRequests(origin); |
| 255 break; | 257 break; |
| 256 case PermissionType::MIDI_SYSEX: | 258 case PermissionType::MIDI_SYSEX: |
| 257 delegate->CancelMIDISysexPermissionRequests(origin); | 259 delegate->CancelMIDISysexPermissionRequests(origin); |
| 258 break; | 260 break; |
| 259 case PermissionType::NOTIFICATIONS: | 261 case PermissionType::NOTIFICATIONS: |
| 260 case PermissionType::PUSH_MESSAGING: | 262 case PermissionType::PUSH_MESSAGING: |
| 261 case PermissionType::DURABLE_STORAGE: | 263 case PermissionType::DURABLE_STORAGE: |
| 264 case PermissionType::AUDIO_RECORDING: | |
| 265 case PermissionType::VIDEO_RECORDING: | |
| 262 NOTIMPLEMENTED() << "CancelPermission not implemented for " | 266 NOTIMPLEMENTED() << "CancelPermission not implemented for " |
| 263 << static_cast<int>(permission); | 267 << static_cast<int>(permission); |
| 264 break; | 268 break; |
| 265 case PermissionType::MIDI: | 269 case PermissionType::MIDI: |
| 266 // There is nothing to cancel so this is simply ignored. | 270 // There is nothing to cancel so this is simply ignored. |
| 267 break; | 271 break; |
| 268 case PermissionType::NUM: | 272 case PermissionType::NUM: |
| 269 NOTREACHED() << "PermissionType::NUM was not expected here."; | 273 NOTREACHED() << "PermissionType::NUM was not expected here."; |
| 270 break; | 274 break; |
| 271 } | 275 } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 304 const GURL& embedding_origin, | 308 const GURL& embedding_origin, |
| 305 const base::Callback<void(PermissionStatus)>& callback) { | 309 const base::Callback<void(PermissionStatus)>& callback) { |
| 306 return -1; | 310 return -1; |
| 307 } | 311 } |
| 308 | 312 |
| 309 void AwPermissionManager::UnsubscribePermissionStatusChange( | 313 void AwPermissionManager::UnsubscribePermissionStatusChange( |
| 310 int subscription_id) { | 314 int subscription_id) { |
| 311 } | 315 } |
| 312 | 316 |
| 313 } // namespace android_webview | 317 } // namespace android_webview |
| OLD | NEW |