| 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 { | 22 namespace device { |
| 23 class HidService; | 23 class HidService; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace extensions { | 26 namespace extensions { |
| 27 | 27 |
| 28 class AppViewGuestDelegate; | 28 class AppViewGuestDelegate; |
| 29 class WebRequestPermissionsDelegate; |
| 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 |
| 37 // Allows the embedder of the extensions module to customize its support for | 38 // Allows the embedder of the extensions module to customize its support for |
| 38 // API features. The embedder must create a single instance in the browser | 39 // API features. The embedder must create a single instance in the browser |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 content::BrowserContext* browser_context, | 73 content::BrowserContext* browser_context, |
| 73 int guest_instance_id, | 74 int guest_instance_id, |
| 74 const std::string& guest_extension_id); | 75 const std::string& guest_extension_id); |
| 75 | 76 |
| 76 // Creates the AppViewGuestDelegate. | 77 // Creates the AppViewGuestDelegate. |
| 77 virtual AppViewGuestDelegate* CreateAppViewGuestDelegate() const; | 78 virtual AppViewGuestDelegate* CreateAppViewGuestDelegate() const; |
| 78 | 79 |
| 79 // Returns the HidService instance for this embedder. | 80 // Returns the HidService instance for this embedder. |
| 80 virtual device::HidService* GetHidService(); | 81 virtual device::HidService* GetHidService(); |
| 81 | 82 |
| 83 // Returns a delegate for WebRequestPermissions. |
| 84 virtual WebRequestPermissionsDelegate* CreateWebRequestPermissionsDelegate() |
| 85 const; |
| 86 |
| 82 // Returns a delegate for some of WebViewGuest's behavior. The caller owns the | 87 // Returns a delegate for some of WebViewGuest's behavior. The caller owns the |
| 83 // returned WebViewGuestDelegate. | 88 // returned WebViewGuestDelegate. |
| 84 virtual WebViewGuestDelegate* CreateWebViewGuestDelegate ( | 89 virtual WebViewGuestDelegate* CreateWebViewGuestDelegate ( |
| 85 WebViewGuest* web_view_guest) const; | 90 WebViewGuest* web_view_guest) const; |
| 86 | 91 |
| 87 // Returns a delegate for some of WebViewPermissionHelper's behavior. The | 92 // Returns a delegate for some of WebViewPermissionHelper's behavior. The |
| 88 // caller owns the returned WebViewPermissionHelperDelegate. | 93 // caller owns the returned WebViewPermissionHelperDelegate. |
| 89 virtual WebViewPermissionHelperDelegate* | 94 virtual WebViewPermissionHelperDelegate* |
| 90 CreateWebViewPermissionHelperDelegate ( | 95 CreateWebViewPermissionHelperDelegate ( |
| 91 WebViewPermissionHelper* web_view_permission_helper) const; | 96 WebViewPermissionHelper* web_view_permission_helper) const; |
| 92 | 97 |
| 93 virtual void RegisterGuestViewTypes() {} | 98 virtual void RegisterGuestViewTypes() {} |
| 94 | 99 |
| 95 // NOTE: If this interface gains too many methods (perhaps more than 20) it | 100 // NOTE: If this interface gains too many methods (perhaps more than 20) it |
| 96 // should be split into one interface per API. | 101 // should be split into one interface per API. |
| 97 }; | 102 }; |
| 98 | 103 |
| 99 } // namespace extensions | 104 } // namespace extensions |
| 100 | 105 |
| 101 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ | 106 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ |
| OLD | NEW |