mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add DLL build support and wrapper that allows clients to transparently switch between static and dynamic CEF builds.
- The libcef project now builds libcef_static.lib instead of libcef.lib. - The libcef_dll project builds libcef.lib and libcef.dll. This DLL exports the new CEF C API defined in cef_capi.h, cef_nplugin_capi.h, cef_string.h and cef_string_map.h. - The libcef_dll_wrapper project builds libcef_dll_wrapper.lib. This static library wraps the new C API calls with an implementation of the CEF C++ interface as defined in cef.h and cef_nplugin.h. - The cefclient project now uses the DLL instead of the static library. - Type definitions have been moved from cef.h to cef_types.h so that they can be shared by both cef.h and cef_capi.h. This change required some enumeration member name modifications throughout the code base. - Fixed variable naming inconsistencies. - Added CefVariant::GetArraySize() method and _NPN_ArrayObjectGetVectorSize() function. - Remove the ProjectSection(WebsiteProperties) sections from cef.sln to improve VS2005 performance. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@16 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -139,7 +139,7 @@ WindowOpenDisposition BrowserWebViewDelegate::DispositionForNavigationAction(
|
||||
// Notify the handler of a browse request
|
||||
CefHandler::RetVal rv = handler->HandleBeforeBrowse(browser_, req,
|
||||
(CefHandler::NavType)type, is_redirect);
|
||||
if(rv == CefHandler::RV_HANDLED)
|
||||
if(rv == RV_HANDLED)
|
||||
return IGNORE_ACTION;
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ void BrowserWebViewDelegate::DidFailProvisionalLoadWithError(
|
||||
CefHandler::RetVal rv = handler->HandleLoadError(browser_,
|
||||
static_cast<CefHandler::ErrorCode>(error.GetErrorCode()),
|
||||
UTF8ToWide(error.GetFailedURL().spec()), error_str);
|
||||
if(rv == CefHandler::RV_HANDLED && !error_str.empty())
|
||||
if(rv == RV_HANDLED && !error_str.empty())
|
||||
error_text = WideToUTF8(error_str);
|
||||
} else {
|
||||
error_text = StringPrintf("Error loading url: %d", error.GetErrorCode());
|
||||
@@ -313,22 +313,22 @@ void BrowserWebViewDelegate::AddMessageToConsole(WebView* webview,
|
||||
|
||||
void BrowserWebViewDelegate::RunJavaScriptAlert(WebView* webview,
|
||||
const std::wstring& message) {
|
||||
CefHandler::RetVal rv = CefHandler::RV_CONTINUE;
|
||||
CefHandler::RetVal rv = RV_CONTINUE;
|
||||
CefRefPtr<CefHandler> handler = browser_->GetHandler();
|
||||
if(handler.get())
|
||||
rv = handler->HandleJSAlert(browser_, message);
|
||||
if(rv != CefHandler::RV_HANDLED)
|
||||
if(rv != RV_HANDLED)
|
||||
ShowJavaScriptAlert(webview, message);
|
||||
}
|
||||
|
||||
bool BrowserWebViewDelegate::RunJavaScriptConfirm(WebView* webview,
|
||||
const std::wstring& message) {
|
||||
CefHandler::RetVal rv = CefHandler::RV_CONTINUE;
|
||||
CefHandler::RetVal rv = RV_CONTINUE;
|
||||
bool retval = false;
|
||||
CefRefPtr<CefHandler> handler = browser_->GetHandler();
|
||||
if(handler.get())
|
||||
rv = handler->HandleJSConfirm(browser_, message, retval);
|
||||
if(rv != CefHandler::RV_HANDLED)
|
||||
if(rv != RV_HANDLED)
|
||||
retval = ShowJavaScriptConfirm(webview, message);
|
||||
return retval;
|
||||
}
|
||||
@@ -336,14 +336,14 @@ bool BrowserWebViewDelegate::RunJavaScriptConfirm(WebView* webview,
|
||||
bool BrowserWebViewDelegate::RunJavaScriptPrompt(WebView* webview,
|
||||
const std::wstring& message, const std::wstring& default_value,
|
||||
std::wstring* result) {
|
||||
CefHandler::RetVal rv = CefHandler::RV_CONTINUE;
|
||||
CefHandler::RetVal rv = RV_CONTINUE;
|
||||
bool retval = false;
|
||||
CefRefPtr<CefHandler> handler = browser_->GetHandler();
|
||||
if(handler.get()) {
|
||||
rv = handler->HandleJSPrompt(browser_, message, default_value,
|
||||
retval, *result);
|
||||
}
|
||||
if(rv != CefHandler::RV_HANDLED)
|
||||
if(rv != RV_HANDLED)
|
||||
retval = ShowJavaScriptPrompt(webview, message, default_value, result);
|
||||
return retval;
|
||||
}
|
||||
|
Reference in New Issue
Block a user