diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index bf8335582..86fdc0bd7 100644 --- a/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -3,7 +3,10 @@ project source tree. Because of the Chromium project's constant state of flux certain revisions of the CEF project may not be compatible with all Chromium revisions, and visa-versa. This document tracks the combination of CEF revision and Chromium revision that have been officially tested by the CEF -development team. +development team. The current CEF revision may be newer than the last CEF +revision listed in this document. In that case, it means that the current CEF +revision is compatible with the last listed Chromium revision. + Date | CEF Revision | Chromium Revision ------------------------------------------------------------------------------- @@ -15,3 +18,4 @@ Date | CEF Revision | Chromium Revision 2009-01-21 | /trunk@8 | /trunk@8386 2009-01-27 | /trunk@9 | /trunk@8751 2009-01-29 | /trunk@10 | /trunk@8875 +2009-02-04 | /trunk@14 | /trunk@9172 diff --git a/libcef/browser_resource_loader_bridge.cc b/libcef/browser_resource_loader_bridge.cc index 6892db141..51781a9a1 100644 --- a/libcef/browser_resource_loader_bridge.cc +++ b/libcef/browser_resource_loader_bridge.cc @@ -46,6 +46,7 @@ #include "net/base/io_buffer.h" #include "net/base/net_util.h" #include "net/base/upload_data.h" +#include "net/proxy/proxy_service.h" #include "net/url_request/url_request.h" #include "webkit/glue/resource_loader_bridge.h" #include "webkit/glue/webframe.h" @@ -628,6 +629,24 @@ std::string GetCookies(const GURL& url, const GURL& policy_url) { return getter->GetResult(); } +// Issue the proxy resolve request on the io thread, and wait +// for the result. +bool FindProxyForUrl(const GURL& url, std::string* proxy_list) { + DCHECK(request_context); + + scoped_refptr sync_proxy_service( + new net::SyncProxyServiceHelper(io_thread->message_loop(), + request_context->proxy_service())); + + net::ProxyInfo proxy_info; + int rv = sync_proxy_service->ResolveProxy(url, &proxy_info); + if (rv == net::OK) { + *proxy_list = proxy_info.GetAnnotatedProxyList(); + } + + return rv == net::OK; +} + } // namespace webkit_glue //----------------------------------------------------------------------------- diff --git a/libcef/context.cc b/libcef/context.cc index a65acaf77..dd2e5046a 100644 --- a/libcef/context.cc +++ b/libcef/context.cc @@ -130,9 +130,9 @@ void CefContext::UIT_RegisterPlugin(struct CefPluginInfo* plugin_info) } } - info.np_getentrypoints = plugin_info->np_getentrypoints; - info.np_initialize = plugin_info->np_initialize; - info.np_shutdown = plugin_info->np_shutdown; + info.entry_points.np_getentrypoints = plugin_info->np_getentrypoints; + info.entry_points.np_initialize = plugin_info->np_initialize; + info.entry_points.np_shutdown = plugin_info->np_shutdown; NPAPI::PluginList::RegisterInternalPlugin(info); NPAPI::PluginList::Singleton()->LoadPlugin(FilePath(info.path)); diff --git a/libcef/libcef.vcproj b/libcef/libcef.vcproj index 91e9f448d..9159ec76e 100644 --- a/libcef/libcef.vcproj +++ b/libcef/libcef.vcproj @@ -197,6 +197,30 @@ > + + + + + + + + + + diff --git a/libcef/webview_host.cc b/libcef/webview_host.cc index 1980ea7dd..aff58735e 100644 --- a/libcef/webview_host.cc +++ b/libcef/webview_host.cc @@ -15,7 +15,7 @@ static const wchar_t kWindowClassName[] = L"WebViewHost"; /*static*/ -WebViewHost* WebViewHost::Create(gfx::NativeWindow parent_window, +WebViewHost* WebViewHost::Create(HWND parent_view, WebViewDelegate* delegate, const WebPreferences& prefs) { WebViewHost* host = new WebViewHost(); @@ -35,7 +35,7 @@ WebViewHost* WebViewHost::Create(gfx::NativeWindow parent_window, host->view_ = CreateWindow(kWindowClassName, NULL, WS_CHILD|WS_CLIPCHILDREN|WS_CLIPSIBLINGS, 0, 0, - 0, 0, parent_window, NULL, + 0, 0, parent_view, NULL, GetModuleHandle(NULL), NULL); win_util::SetWindowUserData(host->view_, host); diff --git a/libcef/webview_host.h b/libcef/webview_host.h index d54d99361..2ecd13e44 100644 --- a/libcef/webview_host.h +++ b/libcef/webview_host.h @@ -21,7 +21,7 @@ class WebViewHost : public WebWidgetHost { // The new instance is deleted once the associated ViewHandle is destroyed. // The newly created window should be resized after it is created, using the // MoveWindow (or equivalent) function. - static WebViewHost* Create(gfx::NativeWindow parent_window, + static WebViewHost* Create(gfx::NativeView parent_window, WebViewDelegate* delegate, const WebPreferences& prefs); diff --git a/libcef/webwidget_host.cc b/libcef/webwidget_host.cc index e57a6a7f9..3e4d16aee 100644 --- a/libcef/webwidget_host.cc +++ b/libcef/webwidget_host.cc @@ -15,7 +15,7 @@ static const wchar_t kWindowClassName[] = L"WebWidgetHost"; /*static*/ -WebWidgetHost* WebWidgetHost::Create(gfx::NativeWindow parent_window, +WebWidgetHost* WebWidgetHost::Create(HWND parent_view, WebWidgetDelegate* delegate) { WebWidgetHost* host = new WebWidgetHost(); @@ -35,8 +35,9 @@ WebWidgetHost* WebWidgetHost::Create(gfx::NativeWindow parent_window, host->view_ = CreateWindowEx(WS_EX_TOOLWINDOW, kWindowClassName, kWindowClassName, WS_POPUP, 0, 0, 0, 0, - parent_window, NULL, GetModuleHandle(NULL), NULL); + parent_view, NULL, GetModuleHandle(NULL), NULL); + TRACK_HWND_CREATION(host->view_); win_util::SetWindowUserData(host->view_, host); host->webwidget_ = WebWidget::Create(delegate); @@ -45,8 +46,8 @@ WebWidgetHost* WebWidgetHost::Create(gfx::NativeWindow parent_window, } /*static*/ -WebWidgetHost* WebWidgetHost::FromWindow(gfx::NativeWindow hwnd) { - return reinterpret_cast(win_util::GetWindowUserData(hwnd)); +WebWidgetHost* WebWidgetHost::FromWindow(HWND view) { + return reinterpret_cast(win_util::GetWindowUserData(view)); } /*static*/ @@ -58,6 +59,9 @@ LRESULT CALLBACK WebWidgetHost::WndProc(HWND hwnd, UINT message, WPARAM wparam, case WM_DESTROY: delete host; break; + case WM_NCDESTROY: + TRACK_HWND_DESTRUCTION(hwnd); + break; case WM_PAINT: { RECT rect; diff --git a/libcef/webwidget_host.h b/libcef/webwidget_host.h index 1762b05c6..d022d03cd 100644 --- a/libcef/webwidget_host.h +++ b/libcef/webwidget_host.h @@ -24,12 +24,12 @@ class WebWidgetHost { // The new instance is deleted once the associated ViewHandle is destroyed. // The newly created window should be resized after it is created, using the // MoveWindow (or equivalent) function. - static WebWidgetHost* Create(gfx::NativeWindow parent_window, + static WebWidgetHost* Create(gfx::NativeView parent_view, WebWidgetDelegate* delegate); - static WebWidgetHost* FromWindow(gfx::NativeWindow view); + static WebWidgetHost* FromWindow(gfx::NativeView view); #if defined(OS_MACOSX) - static void HandleEvent(gfx::NativeWindow window, NSEvent *event); + static void HandleEvent(gfx::NativeView view, NSEvent *event); #endif gfx::NativeView window_handle() const { return view_; } @@ -83,7 +83,7 @@ class WebWidgetHost { // parent: a GtkBox to pack the new widget at the end of // host: a pointer to a WebWidgetHost (or subclass thereof) // --------------------------------------------------------------------------- - static gfx::NativeWindow CreateWindow(gfx::NativeWindow parent, void* host); + static gfx::NativeView CreateWindow(gfx::NativeView parent_view, void* host); void WindowDestroyed(); void Resize(const gfx::Size& size); #endif