• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 the Chromium Embedded Framework Authors. Portions copyright
2 // 2014 The Chromium Authors. All rights reserved. Use of this source code is
3 // governed by a BSD-style license that can be found in the LICENSE file.
4 
5 #include "libcef/browser/extensions/extension_host_delegate.h"
6 
7 #include "libcef/browser/extensions/extensions_browser_client.h"
8 
9 #include "base/logging.h"
10 #include "content/public/browser/web_contents.h"
11 #include "content/public/browser/web_contents_delegate.h"
12 
13 namespace extensions {
14 
CefExtensionHostDelegate(AlloyBrowserHostImpl * browser)15 CefExtensionHostDelegate::CefExtensionHostDelegate(
16     AlloyBrowserHostImpl* browser) {}
17 
~CefExtensionHostDelegate()18 CefExtensionHostDelegate::~CefExtensionHostDelegate() {}
19 
OnExtensionHostCreated(content::WebContents * web_contents)20 void CefExtensionHostDelegate::OnExtensionHostCreated(
21     content::WebContents* web_contents) {}
22 
OnMainFrameCreatedForBackgroundPage(ExtensionHost * host)23 void CefExtensionHostDelegate::OnMainFrameCreatedForBackgroundPage(
24     ExtensionHost* host) {}
25 
26 content::JavaScriptDialogManager*
GetJavaScriptDialogManager()27 CefExtensionHostDelegate::GetJavaScriptDialogManager() {
28   // Never routed here from AlloyBrowserHostImpl.
29   NOTREACHED();
30   return nullptr;
31 }
32 
CreateTab(std::unique_ptr<content::WebContents> web_contents,const std::string & extension_id,WindowOpenDisposition disposition,const gfx::Rect & initial_rect,bool user_gesture)33 void CefExtensionHostDelegate::CreateTab(
34     std::unique_ptr<content::WebContents> web_contents,
35     const std::string& extension_id,
36     WindowOpenDisposition disposition,
37     const gfx::Rect& initial_rect,
38     bool user_gesture) {
39   // TODO(cef): Add support for extensions opening popup windows.
40   NOTIMPLEMENTED();
41 }
42 
ProcessMediaAccessRequest(content::WebContents * web_contents,const content::MediaStreamRequest & request,content::MediaResponseCallback callback,const Extension * extension)43 void CefExtensionHostDelegate::ProcessMediaAccessRequest(
44     content::WebContents* web_contents,
45     const content::MediaStreamRequest& request,
46     content::MediaResponseCallback callback,
47     const Extension* extension) {
48   // Never routed here from AlloyBrowserHostImpl.
49   NOTREACHED();
50 }
51 
CheckMediaAccessPermission(content::RenderFrameHost * render_frame_host,const GURL & security_origin,blink::mojom::MediaStreamType type,const Extension * extension)52 bool CefExtensionHostDelegate::CheckMediaAccessPermission(
53     content::RenderFrameHost* render_frame_host,
54     const GURL& security_origin,
55     blink::mojom::MediaStreamType type,
56     const Extension* extension) {
57   // Never routed here from AlloyBrowserHostImpl.
58   NOTREACHED();
59   return false;
60 }
61 
EnterPictureInPicture(content::WebContents * web_contents,const viz::SurfaceId & surface_id,const gfx::Size & natural_size)62 content::PictureInPictureResult CefExtensionHostDelegate::EnterPictureInPicture(
63     content::WebContents* web_contents,
64     const viz::SurfaceId& surface_id,
65     const gfx::Size& natural_size) {
66   NOTREACHED();
67   return content::PictureInPictureResult::kNotSupported;
68 }
69 
ExitPictureInPicture()70 void CefExtensionHostDelegate::ExitPictureInPicture() {
71   NOTREACHED();
72 }
73 
74 }  // namespace extensions
75