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 |
22 namespace extensions { | 26 namespace extensions { |
23 | 27 |
24 class AppViewGuestDelegate; | 28 class AppViewGuestDelegate; |
25 class WebViewGuest; | 29 class WebViewGuest; |
26 class WebViewGuestDelegate; | 30 class WebViewGuestDelegate; |
27 class WebViewPermissionHelper; | 31 class WebViewPermissionHelper; |
28 class WebViewPermissionHelperDelegate; | 32 class WebViewPermissionHelperDelegate; |
29 class SettingsObserver; | 33 class SettingsObserver; |
30 class SettingsStorageFactory; | 34 class SettingsStorageFactory; |
31 class ValueStoreCache; | 35 class ValueStoreCache; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // Denies the embedding requested by the <appview> specified by | 69 // Denies the embedding requested by the <appview> specified by |
66 // |guest_instance_id|. Returns true if the operation completes successfully. | 70 // |guest_instance_id|. Returns true if the operation completes successfully. |
67 virtual bool AppViewInternalDenyRequest( | 71 virtual bool AppViewInternalDenyRequest( |
68 content::BrowserContext* browser_context, | 72 content::BrowserContext* browser_context, |
69 int guest_instance_id, | 73 int guest_instance_id, |
70 const std::string& guest_extension_id); | 74 const std::string& guest_extension_id); |
71 | 75 |
72 // Creates the AppViewGuestDelegate. | 76 // Creates the AppViewGuestDelegate. |
73 virtual AppViewGuestDelegate* CreateAppViewGuestDelegate() const; | 77 virtual AppViewGuestDelegate* CreateAppViewGuestDelegate() const; |
74 | 78 |
| 79 // Returns the HidService instance for this embedder. |
| 80 virtual device::HidService* GetHidService(); |
| 81 |
75 // Returns a delegate for some of WebViewGuest's behavior. The caller owns the | 82 // Returns a delegate for some of WebViewGuest's behavior. The caller owns the |
76 // returned WebViewGuestDelegate. | 83 // returned WebViewGuestDelegate. |
77 virtual WebViewGuestDelegate* CreateWebViewGuestDelegate ( | 84 virtual WebViewGuestDelegate* CreateWebViewGuestDelegate ( |
78 WebViewGuest* web_view_guest) const; | 85 WebViewGuest* web_view_guest) const; |
79 | 86 |
80 // Returns a delegate for some of WebViewPermissionHelper's behavior. The | 87 // Returns a delegate for some of WebViewPermissionHelper's behavior. The |
81 // caller owns the returned WebViewPermissionHelperDelegate. | 88 // caller owns the returned WebViewPermissionHelperDelegate. |
82 virtual WebViewPermissionHelperDelegate* | 89 virtual WebViewPermissionHelperDelegate* |
83 CreateWebViewPermissionHelperDelegate ( | 90 CreateWebViewPermissionHelperDelegate ( |
84 WebViewPermissionHelper* web_view_permission_helper) const; | 91 WebViewPermissionHelper* web_view_permission_helper) const; |
85 | 92 |
86 virtual void RegisterGuestViewTypes() {} | 93 virtual void RegisterGuestViewTypes() {} |
87 | 94 |
88 // NOTE: If this interface gains too many methods (perhaps more than 20) it | 95 // NOTE: If this interface gains too many methods (perhaps more than 20) it |
89 // should be split into one interface per API. | 96 // should be split into one interface per API. |
90 }; | 97 }; |
91 | 98 |
92 } // namespace extensions | 99 } // namespace extensions |
93 | 100 |
94 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ | 101 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ |
OLD | NEW |