| 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 <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 pending_request_raw->requesting_origin, | 311 pending_request_raw->requesting_origin, |
| 312 base::Bind(&OnRequestResponse, weak_ptr_factory_.GetWeakPtr(), | 312 base::Bind(&OnRequestResponse, weak_ptr_factory_.GetWeakPtr(), |
| 313 request_id, permissions[i])); | 313 request_id, permissions[i])); |
| 314 break; | 314 break; |
| 315 case PermissionType::MIDI_SYSEX: | 315 case PermissionType::MIDI_SYSEX: |
| 316 delegate->RequestMIDISysexPermission( | 316 delegate->RequestMIDISysexPermission( |
| 317 pending_request_raw->requesting_origin, | 317 pending_request_raw->requesting_origin, |
| 318 base::Bind(&OnRequestResponse, weak_ptr_factory_.GetWeakPtr(), | 318 base::Bind(&OnRequestResponse, weak_ptr_factory_.GetWeakPtr(), |
| 319 request_id, permissions[i])); | 319 request_id, permissions[i])); |
| 320 break; | 320 break; |
| 321 case PermissionType::SENSORS: |
| 321 case PermissionType::AUDIO_CAPTURE: | 322 case PermissionType::AUDIO_CAPTURE: |
| 322 case PermissionType::VIDEO_CAPTURE: | 323 case PermissionType::VIDEO_CAPTURE: |
| 323 case PermissionType::NOTIFICATIONS: | 324 case PermissionType::NOTIFICATIONS: |
| 324 case PermissionType::PUSH_MESSAGING: | 325 case PermissionType::PUSH_MESSAGING: |
| 325 case PermissionType::DURABLE_STORAGE: | 326 case PermissionType::DURABLE_STORAGE: |
| 326 case PermissionType::BACKGROUND_SYNC: | 327 case PermissionType::BACKGROUND_SYNC: |
| 327 case PermissionType::FLASH: | 328 case PermissionType::FLASH: |
| 328 NOTIMPLEMENTED() << "RequestPermissions is not implemented for " | 329 NOTIMPLEMENTED() << "RequestPermissions is not implemented for " |
| 329 << static_cast<int>(permissions[i]); | 330 << static_cast<int>(permissions[i]); |
| 330 pending_request_raw->SetPermissionStatus(permissions[i], | 331 pending_request_raw->SetPermissionStatus(permissions[i], |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 break; | 450 break; |
| 450 case PermissionType::PROTECTED_MEDIA_IDENTIFIER: | 451 case PermissionType::PROTECTED_MEDIA_IDENTIFIER: |
| 451 if (delegate) | 452 if (delegate) |
| 452 delegate->CancelProtectedMediaIdentifierPermissionRequests( | 453 delegate->CancelProtectedMediaIdentifierPermissionRequests( |
| 453 requesting_origin); | 454 requesting_origin); |
| 454 break; | 455 break; |
| 455 case PermissionType::MIDI_SYSEX: | 456 case PermissionType::MIDI_SYSEX: |
| 456 if (delegate) | 457 if (delegate) |
| 457 delegate->CancelMIDISysexPermissionRequests(requesting_origin); | 458 delegate->CancelMIDISysexPermissionRequests(requesting_origin); |
| 458 break; | 459 break; |
| 460 case PermissionType::SENSORS: |
| 459 case PermissionType::NOTIFICATIONS: | 461 case PermissionType::NOTIFICATIONS: |
| 460 case PermissionType::PUSH_MESSAGING: | 462 case PermissionType::PUSH_MESSAGING: |
| 461 case PermissionType::DURABLE_STORAGE: | 463 case PermissionType::DURABLE_STORAGE: |
| 462 case PermissionType::AUDIO_CAPTURE: | 464 case PermissionType::AUDIO_CAPTURE: |
| 463 case PermissionType::VIDEO_CAPTURE: | 465 case PermissionType::VIDEO_CAPTURE: |
| 464 case PermissionType::BACKGROUND_SYNC: | 466 case PermissionType::BACKGROUND_SYNC: |
| 465 case PermissionType::FLASH: | 467 case PermissionType::FLASH: |
| 466 NOTIMPLEMENTED() << "CancelPermission not implemented for " | 468 NOTIMPLEMENTED() << "CancelPermission not implemented for " |
| 467 << static_cast<int>(permission); | 469 << static_cast<int>(permission); |
| 468 break; | 470 break; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 ->GetLastCommittedURL().GetOrigin(); | 545 ->GetLastCommittedURL().GetOrigin(); |
| 544 } | 546 } |
| 545 | 547 |
| 546 AwBrowserPermissionRequestDelegate* AwPermissionManager::GetDelegate( | 548 AwBrowserPermissionRequestDelegate* AwPermissionManager::GetDelegate( |
| 547 int render_process_id, int render_frame_id) { | 549 int render_process_id, int render_frame_id) { |
| 548 return AwBrowserPermissionRequestDelegate::FromID(render_process_id, | 550 return AwBrowserPermissionRequestDelegate::FromID(render_process_id, |
| 549 render_frame_id); | 551 render_frame_id); |
| 550 } | 552 } |
| 551 | 553 |
| 552 } // namespace android_webview | 554 } // namespace android_webview |
| OLD | NEW |