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

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

Issue 1560263002: Store Bluetooth permissions in website settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added code to check session->chooser_permission_manager Created 4 years, 11 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
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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 NOTIMPLEMENTED() << "RequestPermission is not implemented for " 246 NOTIMPLEMENTED() << "RequestPermission is not implemented for "
247 << static_cast<int>(permission); 247 << static_cast<int>(permission);
248 callback.Run(content::PermissionStatus::DENIED); 248 callback.Run(content::PermissionStatus::DENIED);
249 break; 249 break;
250 case PermissionType::MIDI: 250 case PermissionType::MIDI:
251 case PermissionType::BLUETOOTH:
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);
256 break; 257 break;
257 } 258 }
258 return request_id; 259 return request_id;
259 } 260 }
260 261
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
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:
365 NOTIMPLEMENTED() << "CancelPermission not implemented for " 366 NOTIMPLEMENTED() << "CancelPermission not implemented for "
366 << static_cast<int>(pending_request->permission); 367 << static_cast<int>(pending_request->permission);
367 break; 368 break;
368 case PermissionType::MIDI: 369 case PermissionType::MIDI:
370 case PermissionType::BLUETOOTH:
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 }
375 377
376 pending_requests_.Remove(request_id); 378 pending_requests_.Remove(request_id);
377 } 379 }
378 380
(...skipping 30 matching lines...) Expand all
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
OLDNEW
« no previous file with comments | « android_webview/browser/aw_browser_context.cc ('k') | blimp/engine/browser/blimp_browser_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698