Make USB permissions work in the new permission message system
[chromium-blink-merge.git] / content / browser / frame_host / render_frame_host_delegate.cc
blob1c8ecd9373fe0a18093bc08d4b41d06575a18829
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
3 // found in the LICENSE file.
5 #include <stddef.h>
7 #include "base/callback.h"
8 #include "base/strings/string16.h"
9 #include "content/browser/frame_host/render_frame_host_delegate.h"
10 #include "ipc/ipc_message.h"
11 #include "ui/gfx/native_widget_types.h"
12 #include "url/gurl.h"
14 namespace content {
16 bool RenderFrameHostDelegate::OnMessageReceived(
17 RenderFrameHost* render_view_host,
18 const IPC::Message& message) {
19 return false;
22 const GURL& RenderFrameHostDelegate::GetMainFrameLastCommittedURL() const {
23 return GURL::EmptyGURL();
26 bool RenderFrameHostDelegate::AddMessageToConsole(
27 int32 level, const base::string16& message, int32 line_no,
28 const base::string16& source_id) {
29 return false;
32 WebContents* RenderFrameHostDelegate::GetAsWebContents() {
33 return NULL;
36 void RenderFrameHostDelegate::RequestMediaAccessPermission(
37 const MediaStreamRequest& request,
38 const MediaResponseCallback& callback) {
39 LOG(ERROR) << "RenderFrameHostDelegate::RequestMediaAccessPermission: "
40 << "Not supported.";
41 callback.Run(MediaStreamDevices(),
42 MEDIA_DEVICE_NOT_SUPPORTED,
43 scoped_ptr<MediaStreamUI>());
46 bool RenderFrameHostDelegate::CheckMediaAccessPermission(
47 const GURL& security_origin,
48 MediaStreamType type) {
49 LOG(ERROR) << "RenderFrameHostDelegate::CheckMediaAccessPermission: "
50 << "Not supported.";
51 return false;
54 AccessibilityMode RenderFrameHostDelegate::GetAccessibilityMode() const {
55 return AccessibilityModeOff;
58 RenderFrameHost* RenderFrameHostDelegate::GetGuestByInstanceID(
59 RenderFrameHost* render_frame_host,
60 int browser_plugin_instance_id) {
61 return NULL;
64 GeolocationServiceContext*
65 RenderFrameHostDelegate::GetGeolocationServiceContext() {
66 return NULL;
69 bool RenderFrameHostDelegate::ShouldRouteMessageEvent(
70 RenderFrameHost* target_rfh,
71 SiteInstance* source_site_instance) const {
72 return false;
75 #if defined(OS_WIN)
76 gfx::NativeViewAccessible
77 RenderFrameHostDelegate::GetParentNativeViewAccessible() {
78 return NULL;
80 #endif // defined(OS_WIN)
82 } // namespace content