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_API_CHROME_EXTENSIONS_API_CLIENT_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_CHROME_EXTENSIONS_API_CLIENT_H_
8 #include "base/compiler_specific.h"
9 #include "extensions/browser/api/extensions_api_client.h"
11 namespace extensions
{
13 // Extra support for extensions APIs in Chrome.
14 class ChromeExtensionsAPIClient
: public ExtensionsAPIClient
{
16 ChromeExtensionsAPIClient();
17 ~ChromeExtensionsAPIClient() override
;
19 // ExtensionsApiClient implementation.
20 void AddAdditionalValueStoreCaches(
21 content::BrowserContext
* context
,
22 const scoped_refptr
<SettingsStorageFactory
>& factory
,
23 const scoped_refptr
<base::ObserverListThreadSafe
<SettingsObserver
>>&
25 std::map
<settings_namespace::Namespace
, ValueStoreCache
*>* caches
)
27 void AttachWebContentsHelpers(content::WebContents
* web_contents
) const
29 AppViewGuestDelegate
* CreateAppViewGuestDelegate() const override
;
30 ExtensionOptionsGuestDelegate
* CreateExtensionOptionsGuestDelegate(
31 ExtensionOptionsGuest
* guest
) const override
;
32 scoped_ptr
<guest_view::GuestViewManagerDelegate
>
33 CreateGuestViewManagerDelegate(
34 content::BrowserContext
* context
) const override
;
35 scoped_ptr
<MimeHandlerViewGuestDelegate
> CreateMimeHandlerViewGuestDelegate(
36 MimeHandlerViewGuest
* guest
) const override
;
37 WebViewGuestDelegate
* CreateWebViewGuestDelegate(
38 WebViewGuest
* web_view_guest
) const override
;
39 WebViewPermissionHelperDelegate
* CreateWebViewPermissionHelperDelegate(
40 WebViewPermissionHelper
* web_view_permission_helper
) const override
;
41 WebRequestEventRouterDelegate
* CreateWebRequestEventRouterDelegate()
43 scoped_refptr
<ContentRulesRegistry
> CreateContentRulesRegistry(
44 content::BrowserContext
* browser_context
,
45 RulesCacheDelegate
* cache_delegate
) const override
;
46 scoped_ptr
<DevicePermissionsPrompt
> CreateDevicePermissionsPrompt(
47 content::WebContents
* web_contents
) const override
;
48 scoped_ptr
<VirtualKeyboardDelegate
> CreateVirtualKeyboardDelegate()
50 ManagementAPIDelegate
* CreateManagementAPIDelegate() const override
;
53 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsAPIClient
);
56 } // namespace extensions
58 #endif // CHROME_BROWSER_EXTENSIONS_API_CHROME_EXTENSIONS_API_CLIENT_H_