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

Side by Side Diff: content/browser/frame_host/render_frame_host_delegate.cc

Issue 584383002: Stricter default RequestMediaAccessPermission and CheckMediaAccessPermission implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix. Created 6 years, 2 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
« no previous file with comments | « no previous file | content/public/browser/web_contents_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "content/browser/frame_host/render_frame_host_delegate.h" 9 #include "content/browser/frame_host/render_frame_host_delegate.h"
10 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
(...skipping 21 matching lines...) Expand all
32 return false; 32 return false;
33 } 33 }
34 34
35 WebContents* RenderFrameHostDelegate::GetAsWebContents() { 35 WebContents* RenderFrameHostDelegate::GetAsWebContents() {
36 return NULL; 36 return NULL;
37 } 37 }
38 38
39 void RenderFrameHostDelegate::RequestMediaAccessPermission( 39 void RenderFrameHostDelegate::RequestMediaAccessPermission(
40 const MediaStreamRequest& request, 40 const MediaStreamRequest& request,
41 const MediaResponseCallback& callback) { 41 const MediaResponseCallback& callback) {
42 LOG(ERROR) << "RenderFrameHostDelegate::RequestMediaAccessPermission: "
43 << "Not supported.";
42 callback.Run(MediaStreamDevices(), 44 callback.Run(MediaStreamDevices(),
43 MEDIA_DEVICE_INVALID_STATE, 45 MEDIA_DEVICE_NOT_SUPPORTED,
44 scoped_ptr<MediaStreamUI>()); 46 scoped_ptr<MediaStreamUI>());
45 } 47 }
46 48
47 bool RenderFrameHostDelegate::CheckMediaAccessPermission( 49 bool RenderFrameHostDelegate::CheckMediaAccessPermission(
48 const GURL& security_origin, 50 const GURL& security_origin,
49 MediaStreamType type) { 51 MediaStreamType type) {
50 DCHECK(type == MEDIA_DEVICE_AUDIO_CAPTURE || 52 LOG(ERROR) << "RenderFrameHostDelegate::CheckMediaAccessPermission: "
51 type == MEDIA_DEVICE_VIDEO_CAPTURE); 53 << "Not supported.";
52 return false; 54 return false;
53 } 55 }
54 56
55 AccessibilityMode RenderFrameHostDelegate::GetAccessibilityMode() const { 57 AccessibilityMode RenderFrameHostDelegate::GetAccessibilityMode() const {
56 return AccessibilityModeOff; 58 return AccessibilityModeOff;
57 } 59 }
58 60
59 RenderFrameHost* RenderFrameHostDelegate::GetGuestByInstanceID( 61 RenderFrameHost* RenderFrameHostDelegate::GetGuestByInstanceID(
60 int browser_plugin_instance_id) { 62 int browser_plugin_instance_id) {
61 return NULL; 63 return NULL;
62 } 64 }
63 65
64 #if defined(OS_WIN) 66 #if defined(OS_WIN)
65 gfx::NativeViewAccessible 67 gfx::NativeViewAccessible
66 RenderFrameHostDelegate::GetParentNativeViewAccessible() { 68 RenderFrameHostDelegate::GetParentNativeViewAccessible() {
67 return NULL; 69 return NULL;
68 } 70 }
69 #endif // defined(OS_WIN) 71 #endif // defined(OS_WIN)
70 72
71 } // namespace content 73 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/browser/web_contents_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698