Add ICU message format support
[chromium-blink-merge.git] / extensions / browser / api / extensions_api_client.cc
blob84264361e80085ae613a756aa3290fb4514129a0
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/extensions_guest_view_manager_delegate.h"
12 #include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h"
13 #include "extensions/browser/guest_view/web_view/web_view_permission_helper_delegate.h"
15 namespace extensions {
16 class AppViewGuestDelegate;
18 namespace {
19 ExtensionsAPIClient* g_instance = NULL;
20 } // namespace
22 ExtensionsAPIClient::ExtensionsAPIClient() { g_instance = this; }
24 ExtensionsAPIClient::~ExtensionsAPIClient() { g_instance = NULL; }
26 // static
27 ExtensionsAPIClient* ExtensionsAPIClient::Get() { return g_instance; }
29 void ExtensionsAPIClient::AddAdditionalValueStoreCaches(
30 content::BrowserContext* context,
31 const scoped_refptr<SettingsStorageFactory>& factory,
32 const scoped_refptr<base::ObserverListThreadSafe<SettingsObserver>>&
33 observers,
34 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches) {
37 void ExtensionsAPIClient::AttachWebContentsHelpers(
38 content::WebContents* web_contents) const {
41 AppViewGuestDelegate* ExtensionsAPIClient::CreateAppViewGuestDelegate() const {
42 return NULL;
45 ExtensionOptionsGuestDelegate*
46 ExtensionsAPIClient::CreateExtensionOptionsGuestDelegate(
47 ExtensionOptionsGuest* guest) const {
48 return NULL;
51 scoped_ptr<guest_view::GuestViewManagerDelegate>
52 ExtensionsAPIClient::CreateGuestViewManagerDelegate(
53 content::BrowserContext* context) const {
54 return make_scoped_ptr(new ExtensionsGuestViewManagerDelegate(context));
57 scoped_ptr<MimeHandlerViewGuestDelegate>
58 ExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate(
59 MimeHandlerViewGuest* guest) const {
60 return scoped_ptr<MimeHandlerViewGuestDelegate>();
63 WebViewGuestDelegate* ExtensionsAPIClient::CreateWebViewGuestDelegate(
64 WebViewGuest* web_view_guest) const {
65 return NULL;
68 WebViewPermissionHelperDelegate* ExtensionsAPIClient::
69 CreateWebViewPermissionHelperDelegate(
70 WebViewPermissionHelper* web_view_permission_helper) const {
71 return new WebViewPermissionHelperDelegate(web_view_permission_helper);
74 WebRequestEventRouterDelegate*
75 ExtensionsAPIClient::CreateWebRequestEventRouterDelegate() const {
76 return new WebRequestEventRouterDelegate();
79 scoped_refptr<ContentRulesRegistry>
80 ExtensionsAPIClient::CreateContentRulesRegistry(
81 content::BrowserContext* browser_context,
82 RulesCacheDelegate* cache_delegate) const {
83 return scoped_refptr<ContentRulesRegistry>();
86 scoped_ptr<DevicePermissionsPrompt>
87 ExtensionsAPIClient::CreateDevicePermissionsPrompt(
88 content::WebContents* web_contents) const {
89 return nullptr;
92 scoped_ptr<VirtualKeyboardDelegate>
93 ExtensionsAPIClient::CreateVirtualKeyboardDelegate() const {
94 return nullptr;
97 ManagementAPIDelegate* ExtensionsAPIClient::CreateManagementAPIDelegate()
98 const {
99 return nullptr;
102 } // namespace extensions