Add testing/scripts/OWNERS
[chromium-blink-merge.git] / extensions / browser / api / extensions_api_client.cc
blob222e6864aec52f9c58f1ad89ee7c0a45a16fdc0e
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;
17 namespace {
18 ExtensionsAPIClient* g_instance = NULL;
19 } // namespace
21 ExtensionsAPIClient::ExtensionsAPIClient() { g_instance = this; }
23 ExtensionsAPIClient::~ExtensionsAPIClient() { g_instance = NULL; }
25 // static
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 {
35 return NULL;
38 ExtensionOptionsGuestDelegate*
39 ExtensionsAPIClient::CreateExtensionOptionsGuestDelegate(
40 ExtensionOptionsGuest* guest) const {
41 return NULL;
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 {
52 return NULL;
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 {
76 return nullptr;
79 scoped_ptr<VirtualKeyboardDelegate>
80 ExtensionsAPIClient::CreateVirtualKeyboardDelegate() const {
81 return nullptr;
84 } // namespace extensions