| 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 #include <memory> |
| 9 | 10 |
| 10 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "extensions/browser/api/declarative_content/content_rules_registry.h" | 12 #include "extensions/browser/api/declarative_content/content_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 namespace base { | 17 namespace base { |
| 18 template <class T> | 18 template <class T> |
| 19 class ObserverListThreadSafe; | 19 class ObserverListThreadSafe; |
| 20 } | 20 } |
| 21 | 21 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 // Creates the AppViewGuestDelegate. | 82 // Creates the AppViewGuestDelegate. |
| 83 virtual AppViewGuestDelegate* CreateAppViewGuestDelegate() const; | 83 virtual AppViewGuestDelegate* CreateAppViewGuestDelegate() const; |
| 84 | 84 |
| 85 // Returns a delegate for ExtensionOptionsGuest. The caller owns the returned | 85 // Returns a delegate for ExtensionOptionsGuest. The caller owns the returned |
| 86 // ExtensionOptionsGuestDelegate. | 86 // ExtensionOptionsGuestDelegate. |
| 87 virtual ExtensionOptionsGuestDelegate* CreateExtensionOptionsGuestDelegate( | 87 virtual ExtensionOptionsGuestDelegate* CreateExtensionOptionsGuestDelegate( |
| 88 ExtensionOptionsGuest* guest) const; | 88 ExtensionOptionsGuest* guest) const; |
| 89 | 89 |
| 90 // Returns a delegate for GuestViewManagerDelegate. | 90 // Returns a delegate for GuestViewManagerDelegate. |
| 91 virtual scoped_ptr<guest_view::GuestViewManagerDelegate> | 91 virtual std::unique_ptr<guest_view::GuestViewManagerDelegate> |
| 92 CreateGuestViewManagerDelegate(content::BrowserContext* context) const; | 92 CreateGuestViewManagerDelegate(content::BrowserContext* context) const; |
| 93 | 93 |
| 94 // Creates a delegate for MimeHandlerViewGuest. | 94 // Creates a delegate for MimeHandlerViewGuest. |
| 95 virtual scoped_ptr<MimeHandlerViewGuestDelegate> | 95 virtual std::unique_ptr<MimeHandlerViewGuestDelegate> |
| 96 CreateMimeHandlerViewGuestDelegate(MimeHandlerViewGuest* guest) const; | 96 CreateMimeHandlerViewGuestDelegate(MimeHandlerViewGuest* guest) const; |
| 97 | 97 |
| 98 // Returns a delegate for some of WebViewGuest's behavior. The caller owns the | 98 // Returns a delegate for some of WebViewGuest's behavior. The caller owns the |
| 99 // returned WebViewGuestDelegate. | 99 // returned WebViewGuestDelegate. |
| 100 virtual WebViewGuestDelegate* CreateWebViewGuestDelegate( | 100 virtual WebViewGuestDelegate* CreateWebViewGuestDelegate( |
| 101 WebViewGuest* web_view_guest) const; | 101 WebViewGuest* web_view_guest) const; |
| 102 | 102 |
| 103 // Returns a delegate for some of WebViewPermissionHelper's behavior. The | 103 // Returns a delegate for some of WebViewPermissionHelper's behavior. The |
| 104 // caller owns the returned WebViewPermissionHelperDelegate. | 104 // caller owns the returned WebViewPermissionHelperDelegate. |
| 105 virtual WebViewPermissionHelperDelegate* | 105 virtual WebViewPermissionHelperDelegate* |
| 106 CreateWebViewPermissionHelperDelegate( | 106 CreateWebViewPermissionHelperDelegate( |
| 107 WebViewPermissionHelper* web_view_permission_helper) const; | 107 WebViewPermissionHelper* web_view_permission_helper) const; |
| 108 | 108 |
| 109 // Creates a delegate for WebRequestEventRouter. | 109 // Creates a delegate for WebRequestEventRouter. |
| 110 virtual WebRequestEventRouterDelegate* CreateWebRequestEventRouterDelegate() | 110 virtual WebRequestEventRouterDelegate* CreateWebRequestEventRouterDelegate() |
| 111 const; | 111 const; |
| 112 | 112 |
| 113 // TODO(wjmaclean): Remove this when (if) ContentRulesRegistry code moves | 113 // TODO(wjmaclean): Remove this when (if) ContentRulesRegistry code moves |
| 114 // to extensions/browser/api. | 114 // to extensions/browser/api. |
| 115 virtual scoped_refptr<ContentRulesRegistry> CreateContentRulesRegistry( | 115 virtual scoped_refptr<ContentRulesRegistry> CreateContentRulesRegistry( |
| 116 content::BrowserContext* browser_context, | 116 content::BrowserContext* browser_context, |
| 117 RulesCacheDelegate* cache_delegate) const; | 117 RulesCacheDelegate* cache_delegate) const; |
| 118 | 118 |
| 119 // Creates a DevicePermissionsPrompt appropriate for the embedder. | 119 // Creates a DevicePermissionsPrompt appropriate for the embedder. |
| 120 virtual scoped_ptr<DevicePermissionsPrompt> CreateDevicePermissionsPrompt( | 120 virtual std::unique_ptr<DevicePermissionsPrompt> |
| 121 content::WebContents* web_contents) const; | 121 CreateDevicePermissionsPrompt(content::WebContents* web_contents) const; |
| 122 | 122 |
| 123 // Returns a delegate for some of VirtualKeyboardAPI's behavior. | 123 // Returns a delegate for some of VirtualKeyboardAPI's behavior. |
| 124 virtual scoped_ptr<VirtualKeyboardDelegate> CreateVirtualKeyboardDelegate() | 124 virtual std::unique_ptr<VirtualKeyboardDelegate> |
| 125 const; | 125 CreateVirtualKeyboardDelegate() const; |
| 126 | 126 |
| 127 // Creates a delegate for handling the management extension api. | 127 // Creates a delegate for handling the management extension api. |
| 128 virtual ManagementAPIDelegate* CreateManagementAPIDelegate() const; | 128 virtual ManagementAPIDelegate* CreateManagementAPIDelegate() const; |
| 129 | 129 |
| 130 // NOTE: If this interface gains too many methods (perhaps more than 20) it | 130 // NOTE: If this interface gains too many methods (perhaps more than 20) it |
| 131 // should be split into one interface per API. | 131 // should be split into one interface per API. |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 } // namespace extensions | 134 } // namespace extensions |
| 135 | 135 |
| 136 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ | 136 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ |
| OLD | NEW |