| 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 "extensions/browser/api/storage/settings_namespace.h" | 12 #include "extensions/browser/api/storage/settings_namespace.h" |
| 12 | 13 |
| 13 class GURL; | 14 class GURL; |
| 14 | 15 |
| 15 template <class T> | 16 template <class T> |
| 16 class ObserverListThreadSafe; | 17 class ObserverListThreadSafe; |
| 17 | 18 |
| 18 namespace content { | 19 namespace content { |
| 19 class BrowserContext; | 20 class BrowserContext; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace extensions { | 23 namespace extensions { |
| 23 | 24 |
| 24 class AppViewGuestDelegate; | 25 class AppViewGuestDelegate; |
| 26 class MimeHandlerViewGuestDelegate; |
| 25 class WebViewGuest; | 27 class WebViewGuest; |
| 26 class WebViewGuestDelegate; | 28 class WebViewGuestDelegate; |
| 27 class WebViewPermissionHelper; | 29 class WebViewPermissionHelper; |
| 28 class WebViewPermissionHelperDelegate; | 30 class WebViewPermissionHelperDelegate; |
| 29 class SettingsObserver; | 31 class SettingsObserver; |
| 30 class SettingsStorageFactory; | 32 class SettingsStorageFactory; |
| 31 class ValueStoreCache; | 33 class ValueStoreCache; |
| 32 | 34 |
| 33 // Allows the embedder of the extensions module to customize its support for | 35 // 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 | 36 // 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. | 52 // to |caches|. By default adds nothing. |
| 51 virtual void AddAdditionalValueStoreCaches( | 53 virtual void AddAdditionalValueStoreCaches( |
| 52 content::BrowserContext* context, | 54 content::BrowserContext* context, |
| 53 const scoped_refptr<SettingsStorageFactory>& factory, | 55 const scoped_refptr<SettingsStorageFactory>& factory, |
| 54 const scoped_refptr<ObserverListThreadSafe<SettingsObserver> >& observers, | 56 const scoped_refptr<ObserverListThreadSafe<SettingsObserver> >& observers, |
| 55 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches); | 57 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches); |
| 56 | 58 |
| 57 // Creates the AppViewGuestDelegate. | 59 // Creates the AppViewGuestDelegate. |
| 58 virtual AppViewGuestDelegate* CreateAppViewGuestDelegate() const; | 60 virtual AppViewGuestDelegate* CreateAppViewGuestDelegate() const; |
| 59 | 61 |
| 62 // Creates a delegate for MimeHandlerViewGuest. |
| 63 virtual scoped_ptr<MimeHandlerViewGuestDelegate> |
| 64 CreateMimeHandlerViewGuestDelegate() 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 |