libcef: Update due to underlying chromium changes.

- Add simple_clipboard_impl.cc to the libcef project because it is no longer included as part of the webkit/glue project.
- Add the FindProxyForUrl() function to browser_resource_loader_bridge.cc.
- NPAPI function pointers are now stored in a structure member of NPAPI::PluginVersionInfo.
- Change gfx::NativeWindow to gfx::NativeView in webview_host and webview_host.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@14 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2009-02-04 22:17:38 +00:00
parent 15f6c270fa
commit 577b8387cf
8 changed files with 66 additions and 15 deletions

View File

@ -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 certain revisions of the CEF project may not be compatible with all Chromium
revisions, and visa-versa. This document tracks the combination of CEF revisions, and visa-versa. This document tracks the combination of CEF
revision and Chromium revision that have been officially tested by the 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 Date | CEF Revision | Chromium Revision
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
@ -15,3 +18,4 @@ Date | CEF Revision | Chromium Revision
2009-01-21 | /trunk@8 | /trunk@8386 2009-01-21 | /trunk@8 | /trunk@8386
2009-01-27 | /trunk@9 | /trunk@8751 2009-01-27 | /trunk@9 | /trunk@8751
2009-01-29 | /trunk@10 | /trunk@8875 2009-01-29 | /trunk@10 | /trunk@8875
2009-02-04 | /trunk@14 | /trunk@9172

View File

@ -46,6 +46,7 @@
#include "net/base/io_buffer.h" #include "net/base/io_buffer.h"
#include "net/base/net_util.h" #include "net/base/net_util.h"
#include "net/base/upload_data.h" #include "net/base/upload_data.h"
#include "net/proxy/proxy_service.h"
#include "net/url_request/url_request.h" #include "net/url_request/url_request.h"
#include "webkit/glue/resource_loader_bridge.h" #include "webkit/glue/resource_loader_bridge.h"
#include "webkit/glue/webframe.h" #include "webkit/glue/webframe.h"
@ -628,6 +629,24 @@ std::string GetCookies(const GURL& url, const GURL& policy_url) {
return getter->GetResult(); 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<net::SyncProxyServiceHelper> 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 } // namespace webkit_glue
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@ -130,9 +130,9 @@ void CefContext::UIT_RegisterPlugin(struct CefPluginInfo* plugin_info)
} }
} }
info.np_getentrypoints = plugin_info->np_getentrypoints; info.entry_points.np_getentrypoints = plugin_info->np_getentrypoints;
info.np_initialize = plugin_info->np_initialize; info.entry_points.np_initialize = plugin_info->np_initialize;
info.np_shutdown = plugin_info->np_shutdown; info.entry_points.np_shutdown = plugin_info->np_shutdown;
NPAPI::PluginList::RegisterInternalPlugin(info); NPAPI::PluginList::RegisterInternalPlugin(info);
NPAPI::PluginList::Singleton()->LoadPlugin(FilePath(info.path)); NPAPI::PluginList::Singleton()->LoadPlugin(FilePath(info.path));

View File

@ -197,6 +197,30 @@
> >
</File> </File>
</Filter> </Filter>
<Filter
Name="external_files"
>
<File
RelativePath="..\..\webkit\glue\simple_clipboard_impl.cc"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
</File>
</Filter>
<File <File
RelativePath=".\browser_drag_delegate.cc" RelativePath=".\browser_drag_delegate.cc"
> >

View File

@ -15,7 +15,7 @@
static const wchar_t kWindowClassName[] = L"WebViewHost"; static const wchar_t kWindowClassName[] = L"WebViewHost";
/*static*/ /*static*/
WebViewHost* WebViewHost::Create(gfx::NativeWindow parent_window, WebViewHost* WebViewHost::Create(HWND parent_view,
WebViewDelegate* delegate, WebViewDelegate* delegate,
const WebPreferences& prefs) { const WebPreferences& prefs) {
WebViewHost* host = new WebViewHost(); WebViewHost* host = new WebViewHost();
@ -35,7 +35,7 @@ WebViewHost* WebViewHost::Create(gfx::NativeWindow parent_window,
host->view_ = CreateWindow(kWindowClassName, NULL, host->view_ = CreateWindow(kWindowClassName, NULL,
WS_CHILD|WS_CLIPCHILDREN|WS_CLIPSIBLINGS, 0, 0, WS_CHILD|WS_CLIPCHILDREN|WS_CLIPSIBLINGS, 0, 0,
0, 0, parent_window, NULL, 0, 0, parent_view, NULL,
GetModuleHandle(NULL), NULL); GetModuleHandle(NULL), NULL);
win_util::SetWindowUserData(host->view_, host); win_util::SetWindowUserData(host->view_, host);

View File

@ -21,7 +21,7 @@ class WebViewHost : public WebWidgetHost {
// The new instance is deleted once the associated ViewHandle is destroyed. // The new instance is deleted once the associated ViewHandle is destroyed.
// The newly created window should be resized after it is created, using the // The newly created window should be resized after it is created, using the
// MoveWindow (or equivalent) function. // MoveWindow (or equivalent) function.
static WebViewHost* Create(gfx::NativeWindow parent_window, static WebViewHost* Create(gfx::NativeView parent_window,
WebViewDelegate* delegate, WebViewDelegate* delegate,
const WebPreferences& prefs); const WebPreferences& prefs);

View File

@ -15,7 +15,7 @@
static const wchar_t kWindowClassName[] = L"WebWidgetHost"; static const wchar_t kWindowClassName[] = L"WebWidgetHost";
/*static*/ /*static*/
WebWidgetHost* WebWidgetHost::Create(gfx::NativeWindow parent_window, WebWidgetHost* WebWidgetHost::Create(HWND parent_view,
WebWidgetDelegate* delegate) { WebWidgetDelegate* delegate) {
WebWidgetHost* host = new WebWidgetHost(); WebWidgetHost* host = new WebWidgetHost();
@ -35,8 +35,9 @@ WebWidgetHost* WebWidgetHost::Create(gfx::NativeWindow parent_window,
host->view_ = CreateWindowEx(WS_EX_TOOLWINDOW, host->view_ = CreateWindowEx(WS_EX_TOOLWINDOW,
kWindowClassName, kWindowClassName, WS_POPUP, kWindowClassName, kWindowClassName, WS_POPUP,
0, 0, 0, 0, 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); win_util::SetWindowUserData(host->view_, host);
host->webwidget_ = WebWidget::Create(delegate); host->webwidget_ = WebWidget::Create(delegate);
@ -45,8 +46,8 @@ WebWidgetHost* WebWidgetHost::Create(gfx::NativeWindow parent_window,
} }
/*static*/ /*static*/
WebWidgetHost* WebWidgetHost::FromWindow(gfx::NativeWindow hwnd) { WebWidgetHost* WebWidgetHost::FromWindow(HWND view) {
return reinterpret_cast<WebWidgetHost*>(win_util::GetWindowUserData(hwnd)); return reinterpret_cast<WebWidgetHost*>(win_util::GetWindowUserData(view));
} }
/*static*/ /*static*/
@ -58,6 +59,9 @@ LRESULT CALLBACK WebWidgetHost::WndProc(HWND hwnd, UINT message, WPARAM wparam,
case WM_DESTROY: case WM_DESTROY:
delete host; delete host;
break; break;
case WM_NCDESTROY:
TRACK_HWND_DESTRUCTION(hwnd);
break;
case WM_PAINT: { case WM_PAINT: {
RECT rect; RECT rect;

View File

@ -24,12 +24,12 @@ class WebWidgetHost {
// The new instance is deleted once the associated ViewHandle is destroyed. // The new instance is deleted once the associated ViewHandle is destroyed.
// The newly created window should be resized after it is created, using the // The newly created window should be resized after it is created, using the
// MoveWindow (or equivalent) function. // MoveWindow (or equivalent) function.
static WebWidgetHost* Create(gfx::NativeWindow parent_window, static WebWidgetHost* Create(gfx::NativeView parent_view,
WebWidgetDelegate* delegate); WebWidgetDelegate* delegate);
static WebWidgetHost* FromWindow(gfx::NativeWindow view); static WebWidgetHost* FromWindow(gfx::NativeView view);
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
static void HandleEvent(gfx::NativeWindow window, NSEvent *event); static void HandleEvent(gfx::NativeView view, NSEvent *event);
#endif #endif
gfx::NativeView window_handle() const { return view_; } 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 // parent: a GtkBox to pack the new widget at the end of
// host: a pointer to a WebWidgetHost (or subclass thereof) // 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 WindowDestroyed();
void Resize(const gfx::Size& size); void Resize(const gfx::Size& size);
#endif #endif