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:
Marshall Greenblatt
2009-03-05 01:10:06 +00:00
parent e75e27e32c
commit 35e21da884
64 changed files with 7196 additions and 552 deletions

View File

@ -231,22 +231,22 @@ public:
ss << L"arg" << i;
switch(args[i]->GetType())
{
case CefVariant::TYPE_NULL:
case VARIANT_TYPE_NULL:
ss << L" null";
break;
case CefVariant::TYPE_BOOL:
case VARIANT_TYPE_BOOL:
ss << L" bool = " << args[i]->GetBool();
break;
case CefVariant::TYPE_INT:
case VARIANT_TYPE_INT:
ss << L" int = " << args[i]->GetInt();
break;
case CefVariant::TYPE_DOUBLE:
case VARIANT_TYPE_DOUBLE:
ss << L" double = " << args[i]->GetDouble();
break;
case CefVariant::TYPE_STRING:
case VARIANT_TYPE_STRING:
ss << L" string = " << args[i]->GetString().c_str();
break;
case CefVariant::TYPE_BOOL_ARRAY:
case VARIANT_TYPE_BOOL_ARRAY:
ss << L" bool array = ";
{
std::vector<bool> vec;
@ -259,7 +259,7 @@ public:
}
}
break;
case CefVariant::TYPE_INT_ARRAY:
case VARIANT_TYPE_INT_ARRAY:
ss << L" int array = ";
{
std::vector<int> vec;
@ -272,7 +272,7 @@ public:
}
}
break;
case CefVariant::TYPE_DOUBLE_ARRAY:
case VARIANT_TYPE_DOUBLE_ARRAY:
ss << L" double array = ";
{
std::vector<double> vec;
@ -285,7 +285,7 @@ public:
}
}
break;
case CefVariant::TYPE_STRING_ARRAY:
case VARIANT_TYPE_STRING_ARRAY:
ss << L" string array = ";
{
std::vector<std::wstring> vec;
@ -580,7 +580,7 @@ public:
// |result| to the resulting value.
virtual RetVal HandleJSPrompt(CefRefPtr<CefBrowser> browser,
const std::wstring& message,
const std::wstring& default_value,
const std::wstring& defaultValue,
bool& retval,
std::wstring& result)
{
@ -809,8 +809,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
std::wstring html =
L"<html><body>ClientJSHandler says:<br>"
L"<script language=\"JavaScript\">"
L"document.writeln(window.myclass.mymethod('foo', 1, 7.6654, 'bar',"
L"[5, 6, 1, 8]));"
L"document.writeln(window.myclass.mymethod(false, 1, 7.6654,"
L"'bar',[false,true],[5, 6, 1, 8],[4.54,10.032,.054],"
L"['one','two']));"
L"</script>"
L"</body></html>";
browser->LoadString(html, L"about:blank");
@ -820,7 +821,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
if(browser.get())
{
browser->ExecuteJavaScript(L"alert('JavaScript execute works!');",
L"about:blank", 0, CefBrowser::TF_MAIN);
L"about:blank", 0, TF_MAIN);
}
return 0;
case ID_TESTS_PLUGIN: // Test our custom plugin