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

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

Issue 1637913002: Change PermissionBubbleRequest::GetRequestingHostname to GetOrigin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 (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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 message_id = IDS_MEDIA_CAPTURE_VIDEO_ONLY_PERMISSION_FRAGMENT; 268 message_id = IDS_MEDIA_CAPTURE_VIDEO_ONLY_PERMISSION_FRAGMENT;
269 else if (!IsAskingForVideo()) 269 else if (!IsAskingForVideo())
270 message_id = IDS_MEDIA_CAPTURE_AUDIO_ONLY_PERMISSION_FRAGMENT; 270 message_id = IDS_MEDIA_CAPTURE_AUDIO_ONLY_PERMISSION_FRAGMENT;
271 return l10n_util::GetStringUTF16(message_id); 271 return l10n_util::GetStringUTF16(message_id);
272 } 272 }
273 273
274 bool MediaStreamDevicesController::HasUserGesture() const { 274 bool MediaStreamDevicesController::HasUserGesture() const {
275 return request_.user_gesture; 275 return request_.user_gesture;
276 } 276 }
277 277
278 GURL MediaStreamDevicesController::GetRequestingHostname() const { 278 GURL MediaStreamDevicesController::GetOrigin() const {
279 return request_.security_origin; 279 return request_.security_origin;
280 } 280 }
281 281
282 void MediaStreamDevicesController::PermissionGranted() { 282 void MediaStreamDevicesController::PermissionGranted() {
283 RecordPermissionAction( 283 RecordPermissionAction(
284 request_, base::Bind(PermissionUmaUtil::PermissionGranted)); 284 request_, base::Bind(PermissionUmaUtil::PermissionGranted));
285 RunCallback(GetNewSetting(CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, 285 RunCallback(GetNewSetting(CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC,
286 old_audio_setting_, CONTENT_SETTING_ALLOW), 286 old_audio_setting_, CONTENT_SETTING_ALLOW),
287 GetNewSetting(CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, 287 GetNewSetting(CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA,
288 old_video_setting_, CONTENT_SETTING_ALLOW), 288 old_video_setting_, CONTENT_SETTING_ALLOW),
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 if (android_permission_blocked) 615 if (android_permission_blocked)
616 return false; 616 return false;
617 617
618 // Don't approve device requests if the tab was hidden. 618 // Don't approve device requests if the tab was hidden.
619 // TODO(qinmin): Add a test for this. http://crbug.com/396869. 619 // TODO(qinmin): Add a test for this. http://crbug.com/396869.
620 // TODO(raymes): Shouldn't this apply to all permissions not just audio/video? 620 // TODO(raymes): Shouldn't this apply to all permissions not just audio/video?
621 return web_contents_->GetRenderWidgetHostView()->IsShowing(); 621 return web_contents_->GetRenderWidgetHostView()->IsShowing();
622 #endif 622 #endif
623 return true; 623 return true;
624 } 624 }
OLDNEW
« no previous file with comments | « chrome/browser/media/media_stream_devices_controller.h ('k') | chrome/browser/permissions/permission_bubble_request_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698