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

Side by Side Diff: chrome/browser/media/webrtc/permission_bubble_media_access_handler.cc

Issue 2746853002: Change MediaStreamDevicesController::RequestPermissions to use the requesting WebContents (Closed)
Patch Set: Change MediaStreamDevicesController::RequestPermissions to use the requesting WebContents 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
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 "chrome/browser/media/webrtc/permission_bubble_media_access_handler.h" 5 #include "chrome/browser/media/webrtc/permission_bubble_media_access_handler.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "chrome/browser/media/webrtc/media_permission.h" 10 #include "chrome/browser/media/webrtc/media_permission.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 if (request.video_type == content::MEDIA_DESKTOP_VIDEO_CAPTURE) { 135 if (request.video_type == content::MEDIA_DESKTOP_VIDEO_CAPTURE) {
136 ScreenCaptureInfoBarDelegateAndroid::Create( 136 ScreenCaptureInfoBarDelegateAndroid::Create(
137 web_contents, request, 137 web_contents, request,
138 base::Bind(&PermissionBubbleMediaAccessHandler::OnAccessRequestResponse, 138 base::Bind(&PermissionBubbleMediaAccessHandler::OnAccessRequestResponse,
139 base::Unretained(this), web_contents)); 139 base::Unretained(this), web_contents));
140 return; 140 return;
141 } 141 }
142 #endif 142 #endif
143 143
144 MediaStreamDevicesController::RequestPermissions( 144 MediaStreamDevicesController::RequestPermissions(
145 web_contents, request, 145 request,
146 base::Bind(&PermissionBubbleMediaAccessHandler::OnAccessRequestResponse, 146 base::Bind(&PermissionBubbleMediaAccessHandler::OnAccessRequestResponse,
147 base::Unretained(this), web_contents)); 147 base::Unretained(this), web_contents));
148 } 148 }
149 149
150 void PermissionBubbleMediaAccessHandler::UpdateMediaRequestState( 150 void PermissionBubbleMediaAccessHandler::UpdateMediaRequestState(
151 int render_process_id, 151 int render_process_id,
152 int render_frame_id, 152 int render_frame_id,
153 int page_request_id, 153 int page_request_id,
154 content::MediaStreamType stream_type, 154 content::MediaStreamType stream_type,
155 content::MediaRequestState state) { 155 content::MediaRequestState state) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 void PermissionBubbleMediaAccessHandler::Observe( 213 void PermissionBubbleMediaAccessHandler::Observe(
214 int type, 214 int type,
215 const content::NotificationSource& source, 215 const content::NotificationSource& source,
216 const content::NotificationDetails& details) { 216 const content::NotificationDetails& details) {
217 DCHECK_CURRENTLY_ON(BrowserThread::UI); 217 DCHECK_CURRENTLY_ON(BrowserThread::UI);
218 DCHECK_EQ(content::NOTIFICATION_WEB_CONTENTS_DESTROYED, type); 218 DCHECK_EQ(content::NOTIFICATION_WEB_CONTENTS_DESTROYED, type);
219 219
220 pending_requests_.erase(content::Source<content::WebContents>(source).ptr()); 220 pending_requests_.erase(content::Source<content::WebContents>(source).ptr());
221 } 221 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698