mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add support for loading extensions (issue #1947)
- Add CefRequestContext::LoadExtension, CefExtension, CefExtensionHandler and related methods/interfaces. - Add chrome://extensions-support that lists supported Chrome APIs. - Add CefBrowserHost::SetAutoResizeEnabled and CefDisplayHandler::OnAutoResize to support browser resize based on preferred web contents size. - views: Add support for custom CefMenuButton popups. - cefclient: Run with `--load-extension=set_page_color` command-line flag for an extension loading example. Add `--use-views` on Windows and Linux for an even better example.
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
#include "components/user_prefs/user_prefs.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/storage_partition.h"
|
||||
#include "extensions/browser/process_manager.h"
|
||||
|
||||
CefBrowserContext::CefBrowserContext(bool is_proxy)
|
||||
: is_proxy_(is_proxy), extension_system_(NULL) {}
|
||||
@ -49,6 +50,11 @@ void CefBrowserContext::Initialize() {
|
||||
extension_system_->InitForRegularProfile(true);
|
||||
}
|
||||
resource_context_->set_extensions_info_map(extension_system_->info_map());
|
||||
|
||||
// Make sure the ProcessManager is created so that it receives extension
|
||||
// load notifications. This is necessary for the proper initialization of
|
||||
// background/event pages.
|
||||
extensions::ProcessManager::Get(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user