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 scoped_ptr
<MimeHandlerViewGuestDelegate
>
45 ExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate(
46 MimeHandlerViewGuest
* guest
) const {
47 return scoped_ptr
<MimeHandlerViewGuestDelegate
>();
50 WebViewGuestDelegate
* ExtensionsAPIClient::CreateWebViewGuestDelegate(
51 WebViewGuest
* web_view_guest
) const {
55 WebViewPermissionHelperDelegate
* ExtensionsAPIClient::
56 CreateWebViewPermissionHelperDelegate(
57 WebViewPermissionHelper
* web_view_permission_helper
) const {
58 return new WebViewPermissionHelperDelegate(web_view_permission_helper
);
61 WebRequestEventRouterDelegate
*
62 ExtensionsAPIClient::CreateWebRequestEventRouterDelegate() const {
63 return new WebRequestEventRouterDelegate();
66 scoped_refptr
<ContentRulesRegistry
>
67 ExtensionsAPIClient::CreateContentRulesRegistry(
68 content::BrowserContext
* browser_context
,
69 RulesCacheDelegate
* cache_delegate
) const {
70 return scoped_refptr
<ContentRulesRegistry
>();
73 scoped_ptr
<DevicePermissionsPrompt
>
74 ExtensionsAPIClient::CreateDevicePermissionsPrompt(
75 content::WebContents
* web_contents
) const {
79 scoped_ptr
<VirtualKeyboardDelegate
>
80 ExtensionsAPIClient::CreateVirtualKeyboardDelegate() const {
84 } // namespace extensions