Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: android_webview/browser/aw_permission_manager.cc

Issue 2791623004: [sensors][permission] Add new permission types in permission module. (Closed)
Patch Set: Use 1 single permissionName SENSORS, add ContentSettings Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/BUILD.gn » ('j') | chrome/browser/generic_sensor/OWNERS » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::AUDIO_CAPTURE: 321 case PermissionType::AUDIO_CAPTURE:
322 case PermissionType::VIDEO_CAPTURE: 322 case PermissionType::VIDEO_CAPTURE:
323 case PermissionType::NOTIFICATIONS: 323 case PermissionType::NOTIFICATIONS:
324 case PermissionType::PUSH_MESSAGING: 324 case PermissionType::PUSH_MESSAGING:
325 case PermissionType::DURABLE_STORAGE: 325 case PermissionType::DURABLE_STORAGE:
326 case PermissionType::BACKGROUND_SYNC: 326 case PermissionType::BACKGROUND_SYNC:
327 case PermissionType::SENSORS:
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],
331 PermissionStatus::DENIED); 332 PermissionStatus::DENIED);
332 break; 333 break;
333 case PermissionType::MIDI: 334 case PermissionType::MIDI:
334 pending_request_raw->SetPermissionStatus(permissions[i], 335 pending_request_raw->SetPermissionStatus(permissions[i],
335 PermissionStatus::GRANTED); 336 PermissionStatus::GRANTED);
336 break; 337 break;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
459 case PermissionType::NOTIFICATIONS: 460 case PermissionType::NOTIFICATIONS:
460 case PermissionType::PUSH_MESSAGING: 461 case PermissionType::PUSH_MESSAGING:
461 case PermissionType::DURABLE_STORAGE: 462 case PermissionType::DURABLE_STORAGE:
462 case PermissionType::AUDIO_CAPTURE: 463 case PermissionType::AUDIO_CAPTURE:
463 case PermissionType::VIDEO_CAPTURE: 464 case PermissionType::VIDEO_CAPTURE:
464 case PermissionType::BACKGROUND_SYNC: 465 case PermissionType::BACKGROUND_SYNC:
466 case PermissionType::SENSORS:
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;
469 case PermissionType::MIDI: 471 case PermissionType::MIDI:
470 // There is nothing to cancel so this is simply ignored. 472 // There is nothing to cancel so this is simply ignored.
471 break; 473 break;
472 case PermissionType::NUM: 474 case PermissionType::NUM:
473 NOTREACHED() << "PermissionType::NUM was not expected here."; 475 NOTREACHED() << "PermissionType::NUM was not expected here.";
474 break; 476 break;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/BUILD.gn » ('j') | chrome/browser/generic_sensor/OWNERS » ('J')

Powered by Google App Engine
This is Rietveld 408576698