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

Side by Side Diff: chrome/browser/media/media_stream_devices_controller.cc

Issue 2123653006: Rename PermissionBubbleRequest to PermissionRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission_manager_rename
Patch Set: Fix missed file Created 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/media/media_stream_devices_controller.h" 5 #include "chrome/browser/media/media_stream_devices_controller.h"
6 6
7 #include <map> 7 #include <map>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 RecordPermissionAction(request_, profile_, 327 RecordPermissionAction(request_, profile_,
328 base::Bind(PermissionUmaUtil::PermissionDismissed)); 328 base::Bind(PermissionUmaUtil::PermissionDismissed));
329 RunCallback(old_audio_setting_, old_video_setting_, 329 RunCallback(old_audio_setting_, old_video_setting_,
330 content::MEDIA_DEVICE_PERMISSION_DISMISSED); 330 content::MEDIA_DEVICE_PERMISSION_DISMISSED);
331 } 331 }
332 332
333 void MediaStreamDevicesController::RequestFinished() { 333 void MediaStreamDevicesController::RequestFinished() {
334 delete this; 334 delete this;
335 } 335 }
336 336
337 PermissionBubbleType MediaStreamDevicesController::GetPermissionBubbleType() 337 PermissionRequestType MediaStreamDevicesController::GetPermissionRequestType()
338 const { 338 const {
339 return PermissionBubbleType::MEDIA_STREAM; 339 return PermissionRequestType::MEDIA_STREAM;
340 } 340 }
341 341
342 content::MediaStreamDevices MediaStreamDevicesController::GetDevices( 342 content::MediaStreamDevices MediaStreamDevicesController::GetDevices(
343 ContentSetting audio_setting, 343 ContentSetting audio_setting,
344 ContentSetting video_setting) { 344 ContentSetting video_setting) {
345 bool audio_allowed = audio_setting == CONTENT_SETTING_ALLOW; 345 bool audio_allowed = audio_setting == CONTENT_SETTING_ALLOW;
346 bool video_allowed = video_setting == CONTENT_SETTING_ALLOW; 346 bool video_allowed = video_setting == CONTENT_SETTING_ALLOW;
347 347
348 if (!audio_allowed && !video_allowed) 348 if (!audio_allowed && !video_allowed)
349 return content::MediaStreamDevices(); 349 return content::MediaStreamDevices();
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 if (android_permission_blocked) 634 if (android_permission_blocked)
635 return false; 635 return false;
636 636
637 // Don't approve device requests if the tab was hidden. 637 // Don't approve device requests if the tab was hidden.
638 // TODO(qinmin): Add a test for this. http://crbug.com/396869. 638 // TODO(qinmin): Add a test for this. http://crbug.com/396869.
639 // TODO(raymes): Shouldn't this apply to all permissions not just audio/video? 639 // TODO(raymes): Shouldn't this apply to all permissions not just audio/video?
640 return web_contents_->GetRenderWidgetHostView()->IsShowing(); 640 return web_contents_->GetRenderWidgetHostView()->IsShowing();
641 #endif 641 #endif
642 return true; 642 return true;
643 } 643 }
OLDNEW
« no previous file with comments | « chrome/browser/media/media_stream_devices_controller.h ('k') | chrome/browser/permissions/mock_permission_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698