| 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 device { | |
| 23 class HidService; | |
| 24 } | |
| 25 | |
| 26 namespace extensions { | 22 namespace extensions { |
| 27 | 23 |
| 28 class AppViewGuestDelegate; | 24 class AppViewGuestDelegate; |
| 29 class WebViewGuest; | 25 class WebViewGuest; |
| 30 class WebViewGuestDelegate; | 26 class WebViewGuestDelegate; |
| 31 class WebViewPermissionHelper; | 27 class WebViewPermissionHelper; |
| 32 class WebViewPermissionHelperDelegate; | 28 class WebViewPermissionHelperDelegate; |
| 33 class SettingsObserver; | 29 class SettingsObserver; |
| 34 class SettingsStorageFactory; | 30 class SettingsStorageFactory; |
| 35 class ValueStoreCache; | 31 class ValueStoreCache; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 54 // to |caches|. By default adds nothing. | 50 // to |caches|. By default adds nothing. |
| 55 virtual void AddAdditionalValueStoreCaches( | 51 virtual void AddAdditionalValueStoreCaches( |
| 56 content::BrowserContext* context, | 52 content::BrowserContext* context, |
| 57 const scoped_refptr<SettingsStorageFactory>& factory, | 53 const scoped_refptr<SettingsStorageFactory>& factory, |
| 58 const scoped_refptr<ObserverListThreadSafe<SettingsObserver> >& observers, | 54 const scoped_refptr<ObserverListThreadSafe<SettingsObserver> >& observers, |
| 59 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches); | 55 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches); |
| 60 | 56 |
| 61 // Creates the AppViewGuestDelegate. | 57 // Creates the AppViewGuestDelegate. |
| 62 virtual AppViewGuestDelegate* CreateAppViewGuestDelegate() const; | 58 virtual AppViewGuestDelegate* CreateAppViewGuestDelegate() const; |
| 63 | 59 |
| 64 // Returns the HidService instance for this embedder. | |
| 65 virtual device::HidService* GetHidService(); | |
| 66 | |
| 67 // Returns a delegate for some of WebViewGuest's behavior. The caller owns the | 60 // Returns a delegate for some of WebViewGuest's behavior. The caller owns the |
| 68 // returned WebViewGuestDelegate. | 61 // returned WebViewGuestDelegate. |
| 69 virtual WebViewGuestDelegate* CreateWebViewGuestDelegate ( | 62 virtual WebViewGuestDelegate* CreateWebViewGuestDelegate ( |
| 70 WebViewGuest* web_view_guest) const; | 63 WebViewGuest* web_view_guest) const; |
| 71 | 64 |
| 72 // Returns a delegate for some of WebViewPermissionHelper's behavior. The | 65 // Returns a delegate for some of WebViewPermissionHelper's behavior. The |
| 73 // caller owns the returned WebViewPermissionHelperDelegate. | 66 // caller owns the returned WebViewPermissionHelperDelegate. |
| 74 virtual WebViewPermissionHelperDelegate* | 67 virtual WebViewPermissionHelperDelegate* |
| 75 CreateWebViewPermissionHelperDelegate ( | 68 CreateWebViewPermissionHelperDelegate ( |
| 76 WebViewPermissionHelper* web_view_permission_helper) const; | 69 WebViewPermissionHelper* web_view_permission_helper) const; |
| 77 | 70 |
| 78 virtual void RegisterGuestViewTypes() {} | 71 virtual void RegisterGuestViewTypes() {} |
| 79 | 72 |
| 80 // NOTE: If this interface gains too many methods (perhaps more than 20) it | 73 // NOTE: If this interface gains too many methods (perhaps more than 20) it |
| 81 // should be split into one interface per API. | 74 // should be split into one interface per API. |
| 82 }; | 75 }; |
| 83 | 76 |
| 84 } // namespace extensions | 77 } // namespace extensions |
| 85 | 78 |
| 86 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ | 79 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ |
| OLD | NEW |