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

Side by Side Diff: content/public/browser/web_contents_delegate.cc

Issue 562263002: Check media permissions through RenderFrameHostDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@render_frame_get_sources
Patch Set: Rebase Created 6 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
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 "content/public/browser/web_contents_delegate.h" 5 #include "content/public/browser/web_contents_delegate.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "content/public/browser/render_view_host.h" 10 #include "content/public/browser/render_view_host.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 162
163 void WebContentsDelegate::RequestMediaAccessPermission( 163 void WebContentsDelegate::RequestMediaAccessPermission(
164 WebContents* web_contents, 164 WebContents* web_contents,
165 const MediaStreamRequest& request, 165 const MediaStreamRequest& request,
166 const MediaResponseCallback& callback) { 166 const MediaResponseCallback& callback) {
167 callback.Run(MediaStreamDevices(), 167 callback.Run(MediaStreamDevices(),
168 MEDIA_DEVICE_INVALID_STATE, 168 MEDIA_DEVICE_INVALID_STATE,
169 scoped_ptr<MediaStreamUI>()); 169 scoped_ptr<MediaStreamUI>());
170 } 170 }
171 171
172 bool WebContentsDelegate::CheckMediaAccessPermission(
173 WebContents* web_contents,
174 const GURL& security_origin,
175 MediaStreamType type) {
176 DCHECK(type == MEDIA_DEVICE_AUDIO_CAPTURE ||
177 type == MEDIA_DEVICE_VIDEO_CAPTURE);
178 return false;
179 }
180
172 bool WebContentsDelegate::RequestPpapiBrokerPermission( 181 bool WebContentsDelegate::RequestPpapiBrokerPermission(
173 WebContents* web_contents, 182 WebContents* web_contents,
174 const GURL& url, 183 const GURL& url,
175 const base::FilePath& plugin_path, 184 const base::FilePath& plugin_path,
176 const base::Callback<void(bool)>& callback) { 185 const base::Callback<void(bool)>& callback) {
177 return false; 186 return false;
178 } 187 }
179 188
180 WebContentsDelegate::~WebContentsDelegate() { 189 WebContentsDelegate::~WebContentsDelegate() {
181 while (!attached_contents_.empty()) { 190 while (!attached_contents_.empty()) {
(...skipping 16 matching lines...) Expand all
198 gfx::Size WebContentsDelegate::GetSizeForNewRenderView( 207 gfx::Size WebContentsDelegate::GetSizeForNewRenderView(
199 WebContents* web_contents) const { 208 WebContents* web_contents) const {
200 return gfx::Size(); 209 return gfx::Size();
201 } 210 }
202 211
203 bool WebContentsDelegate::IsNeverVisible(WebContents* web_contents) { 212 bool WebContentsDelegate::IsNeverVisible(WebContents* web_contents) {
204 return false; 213 return false;
205 } 214 }
206 215
207 } // namespace content 216 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/web_contents_delegate.h ('k') | extensions/browser/app_window/app_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698