| 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 "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "extensions/browser/api/declarative/rules_registry.h" | 12 #include "extensions/browser/api/declarative/rules_registry.h" |
| 13 #include "extensions/browser/api/storage/settings_namespace.h" | 13 #include "extensions/browser/api/storage/settings_namespace.h" |
| 14 | 14 |
| 15 class GURL; | 15 class GURL; |
| 16 | 16 |
| 17 template <class T> | 17 template <class T> |
| 18 class ObserverListThreadSafe; | 18 class ObserverListThreadSafe; |
| 19 | 19 |
| 20 namespace content { | 20 namespace content { |
| 21 class BrowserContext; | 21 class BrowserContext; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace extensions { | 24 namespace extensions { |
| 25 | 25 |
| 26 class AppViewGuestDelegate; | 26 class AppViewGuestDelegate; |
| 27 class ExtensionOptionsGuestDelegate; |
| 27 class MimeHandlerViewGuest; | 28 class MimeHandlerViewGuest; |
| 28 class MimeHandlerViewGuestDelegate; | 29 class MimeHandlerViewGuestDelegate; |
| 29 class WebViewGuest; | 30 class WebViewGuest; |
| 30 class WebViewGuestDelegate; | 31 class WebViewGuestDelegate; |
| 31 class WebViewPermissionHelper; | 32 class WebViewPermissionHelper; |
| 32 class WebViewPermissionHelperDelegate; | 33 class WebViewPermissionHelperDelegate; |
| 33 class SettingsObserver; | 34 class SettingsObserver; |
| 34 class SettingsStorageFactory; | 35 class SettingsStorageFactory; |
| 35 class ValueStoreCache; | 36 class ValueStoreCache; |
| 36 | 37 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 54 // to |caches|. By default adds nothing. | 55 // to |caches|. By default adds nothing. |
| 55 virtual void AddAdditionalValueStoreCaches( | 56 virtual void AddAdditionalValueStoreCaches( |
| 56 content::BrowserContext* context, | 57 content::BrowserContext* context, |
| 57 const scoped_refptr<SettingsStorageFactory>& factory, | 58 const scoped_refptr<SettingsStorageFactory>& factory, |
| 58 const scoped_refptr<ObserverListThreadSafe<SettingsObserver> >& observers, | 59 const scoped_refptr<ObserverListThreadSafe<SettingsObserver> >& observers, |
| 59 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches); | 60 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches); |
| 60 | 61 |
| 61 // Creates the AppViewGuestDelegate. | 62 // Creates the AppViewGuestDelegate. |
| 62 virtual AppViewGuestDelegate* CreateAppViewGuestDelegate() const; | 63 virtual AppViewGuestDelegate* CreateAppViewGuestDelegate() const; |
| 63 | 64 |
| 65 // Returns a delegate for ExtensionOptionsGuest. The caller owns the returned |
| 66 // ExtensionOptionsGuestDelegate. |
| 67 virtual ExtensionOptionsGuestDelegate* CreateExtensionOptionsGuestDelegate() |
| 68 const; |
| 69 |
| 64 // Creates a delegate for MimeHandlerViewGuest. | 70 // Creates a delegate for MimeHandlerViewGuest. |
| 65 virtual scoped_ptr<MimeHandlerViewGuestDelegate> | 71 virtual scoped_ptr<MimeHandlerViewGuestDelegate> |
| 66 CreateMimeHandlerViewGuestDelegate(MimeHandlerViewGuest* guest) const; | 72 CreateMimeHandlerViewGuestDelegate(MimeHandlerViewGuest* guest) const; |
| 67 | 73 |
| 68 // Returns a delegate for some of WebViewGuest's behavior. The caller owns the | 74 // Returns a delegate for some of WebViewGuest's behavior. The caller owns the |
| 69 // returned WebViewGuestDelegate. | 75 // returned WebViewGuestDelegate. |
| 70 virtual WebViewGuestDelegate* CreateWebViewGuestDelegate ( | 76 virtual WebViewGuestDelegate* CreateWebViewGuestDelegate ( |
| 71 WebViewGuest* web_view_guest) const; | 77 WebViewGuest* web_view_guest) const; |
| 72 | 78 |
| 73 // Returns a delegate for some of WebViewPermissionHelper's behavior. The | 79 // Returns a delegate for some of WebViewPermissionHelper's behavior. The |
| 74 // caller owns the returned WebViewPermissionHelperDelegate. | 80 // caller owns the returned WebViewPermissionHelperDelegate. |
| 75 virtual WebViewPermissionHelperDelegate* | 81 virtual WebViewPermissionHelperDelegate* |
| 76 CreateWebViewPermissionHelperDelegate ( | 82 CreateWebViewPermissionHelperDelegate ( |
| 77 WebViewPermissionHelper* web_view_permission_helper) const; | 83 WebViewPermissionHelper* web_view_permission_helper) const; |
| 78 | 84 |
| 79 virtual void RegisterGuestViewTypes() {} | |
| 80 | |
| 81 // TODO(wjmaclean): Remove this as soon as rules_registry_service.* moves to | 85 // TODO(wjmaclean): Remove this as soon as rules_registry_service.* moves to |
| 82 // extensions/browser/api/declarative/. | 86 // extensions/browser/api/declarative/. |
| 83 virtual scoped_refptr<RulesRegistry> GetRulesRegistry( | 87 virtual scoped_refptr<RulesRegistry> GetRulesRegistry( |
| 84 content::BrowserContext* browser_context, | 88 content::BrowserContext* browser_context, |
| 85 const RulesRegistry::WebViewKey& webview_key, | 89 const RulesRegistry::WebViewKey& webview_key, |
| 86 const std::string& event_name); | 90 const std::string& event_name); |
| 87 | 91 |
| 88 // NOTE: If this interface gains too many methods (perhaps more than 20) it | 92 // NOTE: If this interface gains too many methods (perhaps more than 20) it |
| 89 // should be split into one interface per API. | 93 // should be split into one interface per API. |
| 90 }; | 94 }; |
| 91 | 95 |
| 92 } // namespace extensions | 96 } // namespace extensions |
| 93 | 97 |
| 94 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ | 98 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ |
| OLD | NEW |