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" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // Storage API support. | 51 // Storage API support. |
52 | 52 |
53 // Add any additional value store caches (e.g. for chrome.storage.managed) | 53 // Add any additional value store caches (e.g. for chrome.storage.managed) |
54 // to |caches|. By default adds nothing. | 54 // to |caches|. By default adds nothing. |
55 virtual void AddAdditionalValueStoreCaches( | 55 virtual void AddAdditionalValueStoreCaches( |
56 content::BrowserContext* context, | 56 content::BrowserContext* context, |
57 const scoped_refptr<SettingsStorageFactory>& factory, | 57 const scoped_refptr<SettingsStorageFactory>& factory, |
58 const scoped_refptr<ObserverListThreadSafe<SettingsObserver> >& observers, | 58 const scoped_refptr<ObserverListThreadSafe<SettingsObserver> >& observers, |
59 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches); | 59 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches); |
60 | 60 |
61 // Attaches a frame |url| inside the <appview> specified by | |
62 // |guest_instance_id|. Returns true if the operation completes succcessfully. | |
63 virtual bool AppViewInternalAttachFrame( | |
64 content::BrowserContext* browser_context, | |
65 const GURL& url, | |
66 int guest_instance_id, | |
67 const std::string& guest_extension_id); | |
68 | |
69 // Denies the embedding requested by the <appview> specified by | |
70 // |guest_instance_id|. Returns true if the operation completes successfully. | |
71 virtual bool AppViewInternalDenyRequest( | |
72 content::BrowserContext* browser_context, | |
73 int guest_instance_id, | |
74 const std::string& guest_extension_id); | |
75 | |
76 // Creates the AppViewGuestDelegate. | 61 // Creates the AppViewGuestDelegate. |
77 virtual AppViewGuestDelegate* CreateAppViewGuestDelegate() const; | 62 virtual AppViewGuestDelegate* CreateAppViewGuestDelegate() const; |
78 | 63 |
79 // Returns the HidService instance for this embedder. | 64 // Returns the HidService instance for this embedder. |
80 virtual device::HidService* GetHidService(); | 65 virtual device::HidService* GetHidService(); |
81 | 66 |
82 // Returns a delegate for some of WebViewGuest's behavior. The caller owns the | 67 // Returns a delegate for some of WebViewGuest's behavior. The caller owns the |
83 // returned WebViewGuestDelegate. | 68 // returned WebViewGuestDelegate. |
84 virtual WebViewGuestDelegate* CreateWebViewGuestDelegate ( | 69 virtual WebViewGuestDelegate* CreateWebViewGuestDelegate ( |
85 WebViewGuest* web_view_guest) const; | 70 WebViewGuest* web_view_guest) const; |
86 | 71 |
87 // Returns a delegate for some of WebViewPermissionHelper's behavior. The | 72 // Returns a delegate for some of WebViewPermissionHelper's behavior. The |
88 // caller owns the returned WebViewPermissionHelperDelegate. | 73 // caller owns the returned WebViewPermissionHelperDelegate. |
89 virtual WebViewPermissionHelperDelegate* | 74 virtual WebViewPermissionHelperDelegate* |
90 CreateWebViewPermissionHelperDelegate ( | 75 CreateWebViewPermissionHelperDelegate ( |
91 WebViewPermissionHelper* web_view_permission_helper) const; | 76 WebViewPermissionHelper* web_view_permission_helper) const; |
92 | 77 |
93 virtual void RegisterGuestViewTypes() {} | 78 virtual void RegisterGuestViewTypes() {} |
94 | 79 |
95 // NOTE: If this interface gains too many methods (perhaps more than 20) it | 80 // NOTE: If this interface gains too many methods (perhaps more than 20) it |
96 // should be split into one interface per API. | 81 // should be split into one interface per API. |
97 }; | 82 }; |
98 | 83 |
99 } // namespace extensions | 84 } // namespace extensions |
100 | 85 |
101 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ | 86 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ |
OLD | NEW |