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

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

Issue 2339093002: [HBD] Add Plugins permission type and PermissionContext (Closed)
Patch Set: [HBD] Add Plugins permission type and PermissionContext Created 4 years, 3 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/app/generated_resources.grd » ('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 <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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 pending_request->requesting_origin, 310 pending_request->requesting_origin,
311 base::Bind(&OnRequestResponse, weak_ptr_factory_.GetWeakPtr(), 311 base::Bind(&OnRequestResponse, weak_ptr_factory_.GetWeakPtr(),
312 request_id, permissions[i])); 312 request_id, permissions[i]));
313 break; 313 break;
314 case PermissionType::AUDIO_CAPTURE: 314 case PermissionType::AUDIO_CAPTURE:
315 case PermissionType::VIDEO_CAPTURE: 315 case PermissionType::VIDEO_CAPTURE:
316 case PermissionType::NOTIFICATIONS: 316 case PermissionType::NOTIFICATIONS:
317 case PermissionType::PUSH_MESSAGING: 317 case PermissionType::PUSH_MESSAGING:
318 case PermissionType::DURABLE_STORAGE: 318 case PermissionType::DURABLE_STORAGE:
319 case PermissionType::BACKGROUND_SYNC: 319 case PermissionType::BACKGROUND_SYNC:
320 case PermissionType::PLUGINS:
320 NOTIMPLEMENTED() << "RequestPermissions is not implemented for " 321 NOTIMPLEMENTED() << "RequestPermissions is not implemented for "
321 << static_cast<int>(permissions[i]); 322 << static_cast<int>(permissions[i]);
322 pending_request->SetPermissionStatus(permissions[i], 323 pending_request->SetPermissionStatus(permissions[i],
323 PermissionStatus::DENIED); 324 PermissionStatus::DENIED);
324 break; 325 break;
325 case PermissionType::MIDI: 326 case PermissionType::MIDI:
326 pending_request->SetPermissionStatus(permissions[i], 327 pending_request->SetPermissionStatus(permissions[i],
327 PermissionStatus::GRANTED); 328 PermissionStatus::GRANTED);
328 break; 329 break;
329 case PermissionType::NUM: 330 case PermissionType::NUM:
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 case PermissionType::MIDI_SYSEX: 448 case PermissionType::MIDI_SYSEX:
448 if (delegate) 449 if (delegate)
449 delegate->CancelMIDISysexPermissionRequests(requesting_origin); 450 delegate->CancelMIDISysexPermissionRequests(requesting_origin);
450 break; 451 break;
451 case PermissionType::NOTIFICATIONS: 452 case PermissionType::NOTIFICATIONS:
452 case PermissionType::PUSH_MESSAGING: 453 case PermissionType::PUSH_MESSAGING:
453 case PermissionType::DURABLE_STORAGE: 454 case PermissionType::DURABLE_STORAGE:
454 case PermissionType::AUDIO_CAPTURE: 455 case PermissionType::AUDIO_CAPTURE:
455 case PermissionType::VIDEO_CAPTURE: 456 case PermissionType::VIDEO_CAPTURE:
456 case PermissionType::BACKGROUND_SYNC: 457 case PermissionType::BACKGROUND_SYNC:
458 case PermissionType::PLUGINS:
457 NOTIMPLEMENTED() << "CancelPermission not implemented for " 459 NOTIMPLEMENTED() << "CancelPermission not implemented for "
458 << static_cast<int>(permission); 460 << static_cast<int>(permission);
459 break; 461 break;
460 case PermissionType::MIDI: 462 case PermissionType::MIDI:
461 // There is nothing to cancel so this is simply ignored. 463 // There is nothing to cancel so this is simply ignored.
462 break; 464 break;
463 case PermissionType::NUM: 465 case PermissionType::NUM:
464 NOTREACHED() << "PermissionType::NUM was not expected here."; 466 NOTREACHED() << "PermissionType::NUM was not expected here.";
465 break; 467 break;
466 } 468 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 ->GetLastCommittedURL().GetOrigin(); 542 ->GetLastCommittedURL().GetOrigin();
541 } 543 }
542 544
543 AwBrowserPermissionRequestDelegate* AwPermissionManager::GetDelegate( 545 AwBrowserPermissionRequestDelegate* AwPermissionManager::GetDelegate(
544 int render_process_id, int render_frame_id) { 546 int render_process_id, int render_frame_id) {
545 return AwBrowserPermissionRequestDelegate::FromID(render_process_id, 547 return AwBrowserPermissionRequestDelegate::FromID(render_process_id,
546 render_frame_id); 548 render_frame_id);
547 } 549 }
548 550
549 } // namespace android_webview 551 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698