| 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 #ifndef EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ |
| 6 #define EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ | 6 #define EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "extensions/browser/api/storage/settings_namespace.h" | 11 #include "extensions/browser/api/storage/settings_namespace.h" |
| 12 | 12 |
| 13 class GURL; | 13 class GURL; |
| 14 | 14 |
| 15 template <class T> | 15 template <class T> |
| 16 class ObserverListThreadSafe; | 16 class ObserverListThreadSafe; |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 class BrowserContext; | 19 class BrowserContext; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace extensions { | 22 namespace extensions { |
| 23 | 23 |
| 24 class AppViewGuestDelegate; | 24 class AppViewGuestDelegate; |
| 25 class ExtensionOptionsGuestDelegate; |
| 25 class WebViewGuest; | 26 class WebViewGuest; |
| 26 class WebViewGuestDelegate; | 27 class WebViewGuestDelegate; |
| 27 class WebViewPermissionHelper; | 28 class WebViewPermissionHelper; |
| 28 class WebViewPermissionHelperDelegate; | 29 class WebViewPermissionHelperDelegate; |
| 29 class SettingsObserver; | 30 class SettingsObserver; |
| 30 class SettingsStorageFactory; | 31 class SettingsStorageFactory; |
| 31 class ValueStoreCache; | 32 class ValueStoreCache; |
| 32 | 33 |
| 33 // Allows the embedder of the extensions module to customize its support for | 34 // Allows the embedder of the extensions module to customize its support for |
| 34 // API features. The embedder must create a single instance in the browser | 35 // API features. The embedder must create a single instance in the browser |
| (...skipping 15 matching lines...) Expand all Loading... |
| 50 // to |caches|. By default adds nothing. | 51 // to |caches|. By default adds nothing. |
| 51 virtual void AddAdditionalValueStoreCaches( | 52 virtual void AddAdditionalValueStoreCaches( |
| 52 content::BrowserContext* context, | 53 content::BrowserContext* context, |
| 53 const scoped_refptr<SettingsStorageFactory>& factory, | 54 const scoped_refptr<SettingsStorageFactory>& factory, |
| 54 const scoped_refptr<ObserverListThreadSafe<SettingsObserver> >& observers, | 55 const scoped_refptr<ObserverListThreadSafe<SettingsObserver> >& observers, |
| 55 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches); | 56 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches); |
| 56 | 57 |
| 57 // Creates the AppViewGuestDelegate. | 58 // Creates the AppViewGuestDelegate. |
| 58 virtual AppViewGuestDelegate* CreateAppViewGuestDelegate() const; | 59 virtual AppViewGuestDelegate* CreateAppViewGuestDelegate() const; |
| 59 | 60 |
| 61 // Returns a delegate for ExtensionOptionsGuest. The caller owns the returned |
| 62 // ExtensionOptionsGuestDelegate. |
| 63 virtual ExtensionOptionsGuestDelegate* CreateExtensionOptionsGuestDelegate() |
| 64 const; |
| 65 |
| 60 // Returns a delegate for some of WebViewGuest's behavior. The caller owns the | 66 // Returns a delegate for some of WebViewGuest's behavior. The caller owns the |
| 61 // returned WebViewGuestDelegate. | 67 // returned WebViewGuestDelegate. |
| 62 virtual WebViewGuestDelegate* CreateWebViewGuestDelegate ( | 68 virtual WebViewGuestDelegate* CreateWebViewGuestDelegate ( |
| 63 WebViewGuest* web_view_guest) const; | 69 WebViewGuest* web_view_guest) const; |
| 64 | 70 |
| 65 // Returns a delegate for some of WebViewPermissionHelper's behavior. The | 71 // Returns a delegate for some of WebViewPermissionHelper's behavior. The |
| 66 // caller owns the returned WebViewPermissionHelperDelegate. | 72 // caller owns the returned WebViewPermissionHelperDelegate. |
| 67 virtual WebViewPermissionHelperDelegate* | 73 virtual WebViewPermissionHelperDelegate* |
| 68 CreateWebViewPermissionHelperDelegate ( | 74 CreateWebViewPermissionHelperDelegate ( |
| 69 WebViewPermissionHelper* web_view_permission_helper) const; | 75 WebViewPermissionHelper* web_view_permission_helper) const; |
| 70 | 76 |
| 71 virtual void RegisterGuestViewTypes() {} | 77 virtual void RegisterGuestViewTypes() {} |
| 72 | 78 |
| 73 // NOTE: If this interface gains too many methods (perhaps more than 20) it | 79 // NOTE: If this interface gains too many methods (perhaps more than 20) it |
| 74 // should be split into one interface per API. | 80 // should be split into one interface per API. |
| 75 }; | 81 }; |
| 76 | 82 |
| 77 } // namespace extensions | 83 } // namespace extensions |
| 78 | 84 |
| 79 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ | 85 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ |
| OLD | NEW |