1 // Copyright 2015 The Chromium Embedded Framework Authors. 2 // Portions copyright 2014 The Chromium Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 6 #ifndef CEF_LIBCEF_BROWSER_EXTENSIONS_EXTENSIONS_API_CLIENT_H_ 7 #define CEF_LIBCEF_BROWSER_EXTENSIONS_EXTENSIONS_API_CLIENT_H_ 8 9 #include "components/value_store/value_store_factory.h" 10 #include "extensions/browser/api/extensions_api_client.h" 11 12 namespace extensions { 13 14 class CefExtensionsAPIClient : public ExtensionsAPIClient { 15 public: 16 CefExtensionsAPIClient(); 17 18 // ExtensionsAPIClient implementation. 19 AppViewGuestDelegate* CreateAppViewGuestDelegate() const override; 20 std::unique_ptr<guest_view::GuestViewManagerDelegate> 21 CreateGuestViewManagerDelegate( 22 content::BrowserContext* context) const override; 23 std::unique_ptr<MimeHandlerViewGuestDelegate> 24 CreateMimeHandlerViewGuestDelegate( 25 MimeHandlerViewGuest* guest) const override; 26 void AttachWebContentsHelpers( 27 content::WebContents* web_contents) const override; 28 FileSystemDelegate* GetFileSystemDelegate() override; 29 30 // Storage API support. 31 32 // Add any additional value store caches (e.g. for chrome.storage.managed) 33 // to |caches|. By default adds nothing. 34 void AddAdditionalValueStoreCaches( 35 content::BrowserContext* context, 36 const scoped_refptr<value_store::ValueStoreFactory>& factory, 37 const scoped_refptr<base::ObserverListThreadSafe<SettingsObserver>>& 38 observers, 39 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches) 40 override; 41 42 private: 43 std::unique_ptr<FileSystemDelegate> file_system_delegate_; 44 }; 45 46 } // namespace extensions 47 48 #endif // CEF_LIBCEF_BROWSER_EXTENSIONS_EXTENSIONS_API_CLIENT_H_ 49