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.
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"
16 bool RenderFrameHostDelegate::OnMessageReceived(
17 RenderFrameHost
* render_view_host
,
18 const IPC::Message
& message
) {
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
) {
32 WebContents
* RenderFrameHostDelegate::GetAsWebContents() {
36 void RenderFrameHostDelegate::RequestMediaAccessPermission(
37 const MediaStreamRequest
& request
,
38 const MediaResponseCallback
& callback
) {
39 LOG(ERROR
) << "RenderFrameHostDelegate::RequestMediaAccessPermission: "
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: "
54 AccessibilityMode
RenderFrameHostDelegate::GetAccessibilityMode() const {
55 return AccessibilityModeOff
;
58 RenderFrameHost
* RenderFrameHostDelegate::GetGuestByInstanceID(
59 RenderFrameHost
* render_frame_host
,
60 int browser_plugin_instance_id
) {
64 GeolocationServiceContext
*
65 RenderFrameHostDelegate::GetGeolocationServiceContext() {
69 bool RenderFrameHostDelegate::ShouldRouteMessageEvent(
70 RenderFrameHost
* target_rfh
,
71 SiteInstance
* source_site_instance
) const {
76 gfx::NativeViewAccessible
77 RenderFrameHostDelegate::GetParentNativeViewAccessible() {
80 #endif // defined(OS_WIN)
82 } // namespace content