| 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 AppViewGuest; |
| 28 class AppViewGuestDelegate; | 29 class AppViewGuestDelegate; |
| 29 class SettingsObserver; | 30 class SettingsObserver; |
| 30 class SettingsStorageFactory; | 31 class SettingsStorageFactory; |
| 31 class ValueStoreCache; | 32 class ValueStoreCache; |
| 32 | 33 |
| 33 // Allows the embedder of the extensions module to customize its support for | 34 // 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 | 35 // API features. The embedder must create a single instance in the browser |
| 35 // process. Provides a default implementation that does nothing. | 36 // process. Provides a default implementation that does nothing. |
| 36 class ExtensionsAPIClient { | 37 class ExtensionsAPIClient { |
| 37 public: | 38 public: |
| (...skipping 25 matching lines...) Expand all Loading... |
| 63 const std::string& guest_extension_id); | 64 const std::string& guest_extension_id); |
| 64 | 65 |
| 65 // Denies the embedding requested by the <appview> specified by | 66 // Denies the embedding requested by the <appview> specified by |
| 66 // |guest_instance_id|. Returns true if the operation completes successfully. | 67 // |guest_instance_id|. Returns true if the operation completes successfully. |
| 67 virtual bool AppViewInternalDenyRequest( | 68 virtual bool AppViewInternalDenyRequest( |
| 68 content::BrowserContext* browser_context, | 69 content::BrowserContext* browser_context, |
| 69 int guest_instance_id, | 70 int guest_instance_id, |
| 70 const std::string& guest_extension_id); | 71 const std::string& guest_extension_id); |
| 71 | 72 |
| 72 // Creates the AppViewGuestDelegate. | 73 // Creates the AppViewGuestDelegate. |
| 73 virtual AppViewGuestDelegate* CreateAppViewGuestDelegate() const; | 74 virtual AppViewGuestDelegate* CreateAppViewGuestDelegate( |
| 75 AppViewGuest* app_view_guest) const; |
| 74 | 76 |
| 75 // Returns the HidService instance for this embedder. | 77 // Returns the HidService instance for this embedder. |
| 76 virtual device::HidService* GetHidService(); | 78 virtual device::HidService* GetHidService(); |
| 77 | 79 |
| 78 virtual void RegisterGuestViewTypes() {} | 80 virtual void RegisterGuestViewTypes() {} |
| 79 | 81 |
| 80 // NOTE: If this interface gains too many methods (perhaps more than 20) it | 82 // NOTE: If this interface gains too many methods (perhaps more than 20) it |
| 81 // should be split into one interface per API. | 83 // should be split into one interface per API. |
| 82 }; | 84 }; |
| 83 | 85 |
| 84 } // namespace extensions | 86 } // namespace extensions |
| 85 | 87 |
| 86 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ | 88 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ |
| OLD | NEW |