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

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: Fix mounir's comment Created 3 years, 8 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/permissions/permission_manager.cc » ('j') | no next file with comments »
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::AMBIENT_LIGHT_SENSOR:
328 case PermissionType::ACCELEROMETER:
329 case PermissionType::GYROSCOPE:
330 case PermissionType::MAGNETOMETER:
327 case PermissionType::FLASH: 331 case PermissionType::FLASH:
328 NOTIMPLEMENTED() << "RequestPermissions is not implemented for " 332 NOTIMPLEMENTED() << "RequestPermissions is not implemented for "
329 << static_cast<int>(permissions[i]); 333 << static_cast<int>(permissions[i]);
330 pending_request_raw->SetPermissionStatus(permissions[i], 334 pending_request_raw->SetPermissionStatus(permissions[i],
331 PermissionStatus::DENIED); 335 PermissionStatus::DENIED);
332 break; 336 break;
333 case PermissionType::MIDI: 337 case PermissionType::MIDI:
334 pending_request_raw->SetPermissionStatus(permissions[i], 338 pending_request_raw->SetPermissionStatus(permissions[i],
335 PermissionStatus::GRANTED); 339 PermissionStatus::GRANTED);
336 break; 340 break;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 case PermissionType::MIDI_SYSEX: 459 case PermissionType::MIDI_SYSEX:
456 if (delegate) 460 if (delegate)
457 delegate->CancelMIDISysexPermissionRequests(requesting_origin); 461 delegate->CancelMIDISysexPermissionRequests(requesting_origin);
458 break; 462 break;
459 case PermissionType::NOTIFICATIONS: 463 case PermissionType::NOTIFICATIONS:
460 case PermissionType::PUSH_MESSAGING: 464 case PermissionType::PUSH_MESSAGING:
461 case PermissionType::DURABLE_STORAGE: 465 case PermissionType::DURABLE_STORAGE:
462 case PermissionType::AUDIO_CAPTURE: 466 case PermissionType::AUDIO_CAPTURE:
463 case PermissionType::VIDEO_CAPTURE: 467 case PermissionType::VIDEO_CAPTURE:
464 case PermissionType::BACKGROUND_SYNC: 468 case PermissionType::BACKGROUND_SYNC:
469 case PermissionType::AMBIENT_LIGHT_SENSOR:
470 case PermissionType::ACCELEROMETER:
471 case PermissionType::GYROSCOPE:
472 case PermissionType::MAGNETOMETER:
465 case PermissionType::FLASH: 473 case PermissionType::FLASH:
466 NOTIMPLEMENTED() << "CancelPermission not implemented for " 474 NOTIMPLEMENTED() << "CancelPermission not implemented for "
467 << static_cast<int>(permission); 475 << static_cast<int>(permission);
468 break; 476 break;
469 case PermissionType::MIDI: 477 case PermissionType::MIDI:
470 // There is nothing to cancel so this is simply ignored. 478 // There is nothing to cancel so this is simply ignored.
471 break; 479 break;
472 case PermissionType::NUM: 480 case PermissionType::NUM:
473 NOTREACHED() << "PermissionType::NUM was not expected here."; 481 NOTREACHED() << "PermissionType::NUM was not expected here.";
474 break; 482 break;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 ->GetLastCommittedURL().GetOrigin(); 551 ->GetLastCommittedURL().GetOrigin();
544 } 552 }
545 553
546 AwBrowserPermissionRequestDelegate* AwPermissionManager::GetDelegate( 554 AwBrowserPermissionRequestDelegate* AwPermissionManager::GetDelegate(
547 int render_process_id, int render_frame_id) { 555 int render_process_id, int render_frame_id) {
548 return AwBrowserPermissionRequestDelegate::FromID(render_process_id, 556 return AwBrowserPermissionRequestDelegate::FromID(render_process_id,
549 render_frame_id); 557 render_frame_id);
550 } 558 }
551 559
552 } // namespace android_webview 560 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/permissions/permission_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698