| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 base::Bind(&OnRequestResponse, | 236 base::Bind(&OnRequestResponse, |
| 237 weak_ptr_factory_.GetWeakPtr(), request_id, | 237 weak_ptr_factory_.GetWeakPtr(), request_id, |
| 238 callback)); | 238 callback)); |
| 239 } | 239 } |
| 240 break; | 240 break; |
| 241 case PermissionType::AUDIO_CAPTURE: | 241 case PermissionType::AUDIO_CAPTURE: |
| 242 case PermissionType::VIDEO_CAPTURE: | 242 case PermissionType::VIDEO_CAPTURE: |
| 243 case PermissionType::NOTIFICATIONS: | 243 case PermissionType::NOTIFICATIONS: |
| 244 case PermissionType::PUSH_MESSAGING: | 244 case PermissionType::PUSH_MESSAGING: |
| 245 case PermissionType::DURABLE_STORAGE: | 245 case PermissionType::DURABLE_STORAGE: |
| 246 case PermissionType::BLUETOOTH_GUARD: |
| 246 NOTIMPLEMENTED() << "RequestPermission is not implemented for " | 247 NOTIMPLEMENTED() << "RequestPermission is not implemented for " |
| 247 << static_cast<int>(permission); | 248 << static_cast<int>(permission); |
| 248 callback.Run(content::PermissionStatus::DENIED); | 249 callback.Run(content::PermissionStatus::DENIED); |
| 249 break; | 250 break; |
| 250 case PermissionType::MIDI: | 251 case PermissionType::MIDI: |
| 251 callback.Run(content::PermissionStatus::GRANTED); | 252 callback.Run(content::PermissionStatus::GRANTED); |
| 252 break; | 253 break; |
| 253 case PermissionType::NUM: | 254 case PermissionType::NUM: |
| 254 NOTREACHED() << "PermissionType::NUM was not expected here."; | 255 NOTREACHED() << "PermissionType::NUM was not expected here."; |
| 255 callback.Run(content::PermissionStatus::DENIED); | 256 callback.Run(content::PermissionStatus::DENIED); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 break; | 356 break; |
| 356 case PermissionType::MIDI_SYSEX: | 357 case PermissionType::MIDI_SYSEX: |
| 357 delegate->CancelMIDISysexPermissionRequests( | 358 delegate->CancelMIDISysexPermissionRequests( |
| 358 pending_request->requesting_origin); | 359 pending_request->requesting_origin); |
| 359 break; | 360 break; |
| 360 case PermissionType::NOTIFICATIONS: | 361 case PermissionType::NOTIFICATIONS: |
| 361 case PermissionType::PUSH_MESSAGING: | 362 case PermissionType::PUSH_MESSAGING: |
| 362 case PermissionType::DURABLE_STORAGE: | 363 case PermissionType::DURABLE_STORAGE: |
| 363 case PermissionType::AUDIO_CAPTURE: | 364 case PermissionType::AUDIO_CAPTURE: |
| 364 case PermissionType::VIDEO_CAPTURE: | 365 case PermissionType::VIDEO_CAPTURE: |
| 366 case PermissionType::BLUETOOTH_GUARD: |
| 365 NOTIMPLEMENTED() << "CancelPermission not implemented for " | 367 NOTIMPLEMENTED() << "CancelPermission not implemented for " |
| 366 << static_cast<int>(pending_request->permission); | 368 << static_cast<int>(pending_request->permission); |
| 367 break; | 369 break; |
| 368 case PermissionType::MIDI: | 370 case PermissionType::MIDI: |
| 369 // There is nothing to cancel so this is simply ignored. | 371 // There is nothing to cancel so this is simply ignored. |
| 370 break; | 372 break; |
| 371 case PermissionType::NUM: | 373 case PermissionType::NUM: |
| 372 NOTREACHED() << "PermissionType::NUM was not expected here."; | 374 NOTREACHED() << "PermissionType::NUM was not expected here."; |
| 373 break; | 375 break; |
| 374 } | 376 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 const GURL& embedding_origin, | 411 const GURL& embedding_origin, |
| 410 const base::Callback<void(PermissionStatus)>& callback) { | 412 const base::Callback<void(PermissionStatus)>& callback) { |
| 411 return kNoPendingOperation; | 413 return kNoPendingOperation; |
| 412 } | 414 } |
| 413 | 415 |
| 414 void AwPermissionManager::UnsubscribePermissionStatusChange( | 416 void AwPermissionManager::UnsubscribePermissionStatusChange( |
| 415 int subscription_id) { | 417 int subscription_id) { |
| 416 } | 418 } |
| 417 | 419 |
| 418 } // namespace android_webview | 420 } // namespace android_webview |
| OLD | NEW |