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 #include "extensions/browser/api/extensions_api_client.h"
7 #include "base/logging.h"
8 #include "extensions/browser/api/device_permissions_prompt.h"
9 #include "extensions/browser/api/virtual_keyboard_private/virtual_keyboard_delegate.h"
10 #include "extensions/browser/api/web_request/web_request_event_router_delegate.h"
11 #include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h"
12 #include "extensions/browser/guest_view/web_view/web_view_permission_helper_delegate.h"
14 namespace extensions
{
15 class AppViewGuestDelegate
;
18 ExtensionsAPIClient
* g_instance
= NULL
;
21 ExtensionsAPIClient::ExtensionsAPIClient() { g_instance
= this; }
23 ExtensionsAPIClient::~ExtensionsAPIClient() { g_instance
= NULL
; }
26 ExtensionsAPIClient
* ExtensionsAPIClient::Get() { return g_instance
; }
28 void ExtensionsAPIClient::AddAdditionalValueStoreCaches(
29 content::BrowserContext
* context
,
30 const scoped_refptr
<SettingsStorageFactory
>& factory
,
31 const scoped_refptr
<ObserverListThreadSafe
<SettingsObserver
> >& observers
,
32 std::map
<settings_namespace::Namespace
, ValueStoreCache
*>* caches
) {}
34 AppViewGuestDelegate
* ExtensionsAPIClient::CreateAppViewGuestDelegate() const {
38 ExtensionOptionsGuestDelegate
*
39 ExtensionsAPIClient::CreateExtensionOptionsGuestDelegate(
40 ExtensionOptionsGuest
* guest
) const {
44 ExtensionViewGuestDelegate
*
45 ExtensionsAPIClient::CreateExtensionViewGuestDelegate(
46 ExtensionViewGuest
* guest
) const {
50 scoped_ptr
<MimeHandlerViewGuestDelegate
>
51 ExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate(
52 MimeHandlerViewGuest
* guest
) const {
53 return scoped_ptr
<MimeHandlerViewGuestDelegate
>();
56 WebViewGuestDelegate
* ExtensionsAPIClient::CreateWebViewGuestDelegate(
57 WebViewGuest
* web_view_guest
) const {
61 WebViewPermissionHelperDelegate
* ExtensionsAPIClient::
62 CreateWebViewPermissionHelperDelegate(
63 WebViewPermissionHelper
* web_view_permission_helper
) const {
64 return new WebViewPermissionHelperDelegate(web_view_permission_helper
);
67 WebRequestEventRouterDelegate
*
68 ExtensionsAPIClient::CreateWebRequestEventRouterDelegate() const {
69 return new WebRequestEventRouterDelegate();
72 scoped_refptr
<ContentRulesRegistry
>
73 ExtensionsAPIClient::CreateContentRulesRegistry(
74 content::BrowserContext
* browser_context
,
75 RulesCacheDelegate
* cache_delegate
) const {
76 return scoped_refptr
<ContentRulesRegistry
>();
79 scoped_ptr
<DevicePermissionsPrompt
>
80 ExtensionsAPIClient::CreateDevicePermissionsPrompt(
81 content::WebContents
* web_contents
) const {
85 scoped_ptr
<VirtualKeyboardDelegate
>
86 ExtensionsAPIClient::CreateVirtualKeyboardDelegate() const {
90 ManagementAPIDelegate
* ExtensionsAPIClient::CreateManagementAPIDelegate()
95 } // namespace extensions