Add CefDisplayHandler::OnLoadingProgressChange callback (issue #2382)

This commit is contained in:
Mike Wiedenbauer
2018-04-10 13:52:15 -04:00
committed by Marshall Greenblatt
parent 90863b8c5d
commit bb28b85bdd
8 changed files with 143 additions and 4 deletions

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=ca92b50b1b21d6de1a591edce5025267abdd2342$
// $hash=9506e4c51606a428b82d70eb5a2366fed4c1c61e$
//
#include "libcef_dll/ctocpp/display_handler_ctocpp.h"
@ -202,6 +202,25 @@ bool CefDisplayHandlerCToCpp::OnAutoResize(CefRefPtr<CefBrowser> browser,
return _retval ? true : false;
}
void CefDisplayHandlerCToCpp::OnLoadingProgressChange(
CefRefPtr<CefBrowser> browser,
double progress) {
cef_display_handler_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_loading_progress_change))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: browser; type: refptr_diff
DCHECK(browser.get());
if (!browser.get())
return;
// Execute
_struct->on_loading_progress_change(_struct, CefBrowserCppToC::Wrap(browser),
progress);
}
// CONSTRUCTOR - Do not edit by hand.
CefDisplayHandlerCToCpp::CefDisplayHandlerCToCpp() {}

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=f0d07bdd6b1de086c06a2e5ad7960d7cd7409894$
// $hash=6fc6aa5750ef1aa3353c78daa018f761a7ba22a3$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_DISPLAY_HANDLER_CTOCPP_H_
@ -54,6 +54,8 @@ class CefDisplayHandlerCToCpp
int line) override;
bool OnAutoResize(CefRefPtr<CefBrowser> browser,
const CefSize& new_size) override;
void OnLoadingProgressChange(CefRefPtr<CefBrowser> browser,
double progress) override;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_DISPLAY_HANDLER_CTOCPP_H_