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:
@ -114,6 +114,18 @@ class CefDisplayHandler : public virtual CefBaseRefCounted {
|
||||
int line) {
|
||||
return false;
|
||||
}
|
||||
|
||||
///
|
||||
// Called when auto-resize is enabled via CefBrowserHost::SetAutoResizeEnabled
|
||||
// and the contents have auto-resized. |new_size| will be the desired size in
|
||||
// view coordinates. Return true if the resize was handled or false for
|
||||
// default handling.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnAutoResize(CefRefPtr<CefBrowser> browser,
|
||||
const CefSize& new_size) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_DISPLAY_HANDLER_H_
|
||||
|
Reference in New Issue
Block a user