OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "extensions/browser/api/extensions_api_client.h" | 5 #include "extensions/browser/api/extensions_api_client.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_gues
t_delegate.h" | 8 #include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_gues
t_delegate.h" |
9 #include "extensions/browser/guest_view/web_view/web_view_permission_helper_dele
gate.h" | 9 #include "extensions/browser/guest_view/web_view/web_view_permission_helper_dele
gate.h" |
10 | 10 |
11 namespace extensions { | 11 namespace extensions { |
12 class AppViewGuestDelegate; | 12 class AppViewGuestDelegate; |
13 | 13 |
14 namespace { | 14 namespace { |
15 ExtensionsAPIClient* g_instance = NULL; | 15 ExtensionsAPIClient* g_instance = nullptr; |
16 } // namespace | 16 } // namespace |
17 | 17 |
18 ExtensionsAPIClient::ExtensionsAPIClient() { g_instance = this; } | 18 ExtensionsAPIClient::ExtensionsAPIClient() { g_instance = this; } |
19 | 19 |
20 ExtensionsAPIClient::~ExtensionsAPIClient() { g_instance = NULL; } | 20 ExtensionsAPIClient::~ExtensionsAPIClient() { |
| 21 g_instance = nullptr; |
| 22 } |
21 | 23 |
22 // static | 24 // static |
23 ExtensionsAPIClient* ExtensionsAPIClient::Get() { return g_instance; } | 25 ExtensionsAPIClient* ExtensionsAPIClient::Get() { return g_instance; } |
24 | 26 |
25 void ExtensionsAPIClient::AddAdditionalValueStoreCaches( | 27 void ExtensionsAPIClient::AddAdditionalValueStoreCaches( |
26 content::BrowserContext* context, | 28 content::BrowserContext* context, |
27 const scoped_refptr<SettingsStorageFactory>& factory, | 29 const scoped_refptr<SettingsStorageFactory>& factory, |
28 const scoped_refptr<ObserverListThreadSafe<SettingsObserver> >& observers, | 30 const scoped_refptr<ObserverListThreadSafe<SettingsObserver> >& observers, |
29 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches) {} | 31 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches) {} |
30 | 32 |
31 AppViewGuestDelegate* ExtensionsAPIClient::CreateAppViewGuestDelegate() const { | 33 AppViewGuestDelegate* ExtensionsAPIClient::CreateAppViewGuestDelegate() const { |
32 return NULL; | 34 return nullptr; |
33 } | 35 } |
34 | 36 |
35 ExtensionOptionsGuestDelegate* | 37 ExtensionOptionsGuestDelegate* |
36 ExtensionsAPIClient::CreateExtensionOptionsGuestDelegate( | 38 ExtensionsAPIClient::CreateExtensionOptionsGuestDelegate( |
37 ExtensionOptionsGuest* guest) const { | 39 ExtensionOptionsGuest* guest) const { |
38 return NULL; | 40 return nullptr; |
39 } | 41 } |
40 | 42 |
41 scoped_ptr<MimeHandlerViewGuestDelegate> | 43 scoped_ptr<MimeHandlerViewGuestDelegate> |
42 ExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate( | 44 ExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate( |
43 MimeHandlerViewGuest* guest) const { | 45 MimeHandlerViewGuest* guest) const { |
44 return scoped_ptr<MimeHandlerViewGuestDelegate>(); | 46 return scoped_ptr<MimeHandlerViewGuestDelegate>(); |
45 } | 47 } |
46 | 48 |
47 WebViewGuestDelegate* ExtensionsAPIClient::CreateWebViewGuestDelegate( | 49 WebViewGuestDelegate* ExtensionsAPIClient::CreateWebViewGuestDelegate( |
48 WebViewGuest* web_view_guest) const { | 50 WebViewGuest* web_view_guest) const { |
49 return NULL; | 51 return nullptr; |
50 } | 52 } |
51 | 53 |
52 WebViewPermissionHelperDelegate* ExtensionsAPIClient:: | 54 WebViewPermissionHelperDelegate* ExtensionsAPIClient:: |
53 CreateWebViewPermissionHelperDelegate( | 55 CreateWebViewPermissionHelperDelegate( |
54 WebViewPermissionHelper* web_view_permission_helper) const { | 56 WebViewPermissionHelper* web_view_permission_helper) const { |
55 return new WebViewPermissionHelperDelegate(web_view_permission_helper); | 57 return new WebViewPermissionHelperDelegate(web_view_permission_helper); |
56 } | 58 } |
57 | 59 |
58 scoped_refptr<RulesRegistry> ExtensionsAPIClient::GetRulesRegistry( | 60 scoped_refptr<RulesRegistry> ExtensionsAPIClient::GetRulesRegistry( |
59 content::BrowserContext* browser_context, | 61 content::BrowserContext* browser_context, |
60 const RulesRegistry::WebViewKey& webview_key, | 62 const RulesRegistry::WebViewKey& webview_key, |
61 const std::string& event_name) { | 63 const std::string& event_name) { |
62 return scoped_refptr<RulesRegistry>(); | 64 return scoped_refptr<RulesRegistry>(); |
63 } | 65 } |
64 | 66 |
65 } // namespace extensions | 67 } // namespace extensions |
OLD | NEW |