Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / content / public / browser / browser_plugin_guest_delegate.cc
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.
4
5 #include "content/public/browser/browser_plugin_guest_delegate.h"
6
7 #include "base/callback.h"
8
9 namespace content {
10
11 WebContents* BrowserPluginGuestDelegate::GetOpener() const {
12   return NULL;
13 }
14
15 bool BrowserPluginGuestDelegate::HandleKeyboardEvent(
16     const NativeWebKeyboardEvent& event) {
17   return false;
18 }
19
20 bool BrowserPluginGuestDelegate::IsDragAndDropEnabled() {
21   return false;
22 }
23
24 bool BrowserPluginGuestDelegate::IsOverridingUserAgent() const {
25   return false;
26 }
27
28 GURL BrowserPluginGuestDelegate::ResolveURL(const std::string& src) {
29   return GURL(src);
30 }
31
32 void BrowserPluginGuestDelegate::RequestMediaAccessPermission(
33     const MediaStreamRequest& request,
34     const MediaResponseCallback& callback) {
35   callback.Run(MediaStreamDevices(),
36                MEDIA_DEVICE_INVALID_STATE,
37                scoped_ptr<MediaStreamUI>());
38 }
39
40 void BrowserPluginGuestDelegate::CanDownload(
41     const std::string& request_method,
42     const GURL& url,
43     const base::Callback<void(bool)>& callback) {
44   callback.Run(true);
45 }
46
47 JavaScriptDialogManager*
48 BrowserPluginGuestDelegate::GetJavaScriptDialogManager() {
49   return NULL;
50 }
51
52 bool BrowserPluginGuestDelegate::HandleContextMenu(
53     const ContextMenuParams& params) {
54   return false;
55 }
56
57 }  // namespace content