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:
Marshall Greenblatt
2017-08-03 18:55:19 -04:00
parent 5b12134a45
commit 9cff99dc4e
178 changed files with 10360 additions and 650 deletions

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=c2256192e44464a7c89f2e43619a92049d1c080c$
// $hash=8c1a14a8634516a37f562c6b295c30fe3f30c179$
//
#include "libcef_dll/ctocpp/views/window_delegate_ctocpp.h"
@@ -50,6 +50,50 @@ void CefWindowDelegateCToCpp::OnWindowDestroyed(CefRefPtr<CefWindow> window) {
_struct->on_window_destroyed(_struct, CefWindowCppToC::Wrap(window));
}
CefRefPtr<CefWindow> CefWindowDelegateCToCpp::GetParentWindow(
CefRefPtr<CefWindow> window,
bool* is_menu,
bool* can_activate_menu) {
cef_window_delegate_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_parent_window))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: window; type: refptr_diff
DCHECK(window.get());
if (!window.get())
return NULL;
// Verify param: is_menu; type: bool_byaddr
DCHECK(is_menu);
if (!is_menu)
return NULL;
// Verify param: can_activate_menu; type: bool_byaddr
DCHECK(can_activate_menu);
if (!can_activate_menu)
return NULL;
// Translate param: is_menu; type: bool_byaddr
int is_menuInt = is_menu ? *is_menu : 0;
// Translate param: can_activate_menu; type: bool_byaddr
int can_activate_menuInt = can_activate_menu ? *can_activate_menu : 0;
// Execute
cef_window_t* _retval =
_struct->get_parent_window(_struct, CefWindowCppToC::Wrap(window),
&is_menuInt, &can_activate_menuInt);
// Restore param:is_menu; type: bool_byaddr
if (is_menu)
*is_menu = is_menuInt ? true : false;
// Restore param:can_activate_menu; type: bool_byaddr
if (can_activate_menu)
*can_activate_menu = can_activate_menuInt ? true : false;
// Return type: refptr_diff
return CefWindowCppToC::Unwrap(_retval);
}
bool CefWindowDelegateCToCpp::IsFrameless(CefRefPtr<CefWindow> window) {
cef_window_delegate_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, is_frameless))