1 // Copyright 2014 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 #ifndef CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_HOST_DELEGATE_H_
6 #define CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_HOST_DELEGATE_H_
8 #include "extensions/browser/extension_host_delegate.h"
10 namespace extensions
{
12 // Chrome support for ExtensionHost.
13 class ChromeExtensionHostDelegate
: public ExtensionHostDelegate
{
15 ChromeExtensionHostDelegate();
16 virtual ~ChromeExtensionHostDelegate();
18 // ExtensionHostDelegate implementation.
19 virtual void OnExtensionHostCreated(content::WebContents
* web_contents
)
21 virtual void OnRenderViewCreatedForBackgroundPage(ExtensionHost
* host
)
23 virtual content::JavaScriptDialogManager
* GetJavaScriptDialogManager()
25 virtual void CreateTab(content::WebContents
* web_contents
,
26 const std::string
& extension_id
,
27 WindowOpenDisposition disposition
,
28 const gfx::Rect
& initial_pos
,
29 bool user_gesture
) override
;
30 virtual void ProcessMediaAccessRequest(
31 content::WebContents
* web_contents
,
32 const content::MediaStreamRequest
& request
,
33 const content::MediaResponseCallback
& callback
,
34 const Extension
* extension
) override
;
35 virtual bool CheckMediaAccessPermission(content::WebContents
* web_contents
,
36 const GURL
& security_origin
,
37 content::MediaStreamType type
,
38 const Extension
* extension
) override
;
41 } // namespace extensions
43 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_HOST_DELEGATE_H_