libcef: Modifications due to underlying chromium changes.
- Change gfx::WindowHandle to gfx::NativeWindow and gfx::ViewHandle to gfx::NativeView. - Add proxy support to BrowserWebViewDelegate. - Add webkit\port\platform\graphics\skia path to libcef_webkit_includes.vsprops due to relocation of PlatformContextSkia.h. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@4 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
166b8524dd
commit
d0639c9f4e
|
@ -9,3 +9,4 @@ Date | CEF Revision | Chromium Revision
|
|||
-------------------------------------------------------------------------------
|
||||
2008-12-02 | /trunk@2 | /trunk@6213
|
||||
2008-12-05 | /trunk@3 | /trunk@6430
|
||||
2008-12-13 | /trunk@4 | /trunk@6968
|
||||
|
|
|
@ -7,21 +7,24 @@
|
|||
#include "browser_request_context.h"
|
||||
|
||||
#include "net/base/cookie_monster.h"
|
||||
#include "net/proxy/proxy_service.h"
|
||||
#include "webkit/glue/webkit_glue.h"
|
||||
|
||||
BrowserRequestContext::BrowserRequestContext() {
|
||||
Init(std::wstring(), net::HttpCache::NORMAL);
|
||||
Init(std::wstring(), net::HttpCache::NORMAL, false);
|
||||
}
|
||||
|
||||
BrowserRequestContext::BrowserRequestContext(
|
||||
const std::wstring& cache_path,
|
||||
net::HttpCache::Mode cache_mode) {
|
||||
Init(cache_path, cache_mode);
|
||||
net::HttpCache::Mode cache_mode,
|
||||
bool no_proxy) {
|
||||
Init(cache_path, cache_mode, no_proxy);
|
||||
}
|
||||
|
||||
void BrowserRequestContext::Init(
|
||||
const std::wstring& cache_path,
|
||||
net::HttpCache::Mode cache_mode) {
|
||||
net::HttpCache::Mode cache_mode,
|
||||
bool no_proxy) {
|
||||
cookie_store_ = new net::CookieMonster();
|
||||
|
||||
user_agent_ = webkit_glue::GetUserAgent();
|
||||
|
@ -30,11 +33,15 @@ void BrowserRequestContext::Init(
|
|||
accept_language_ = "en-us,en";
|
||||
accept_charset_ = "iso-8859-1,*,utf-8";
|
||||
|
||||
net::ProxyInfo proxy_info;
|
||||
proxy_info.UseDirect();
|
||||
proxy_service_ = net::ProxyService::Create(no_proxy ? &proxy_info : NULL);
|
||||
|
||||
net::HttpCache *cache;
|
||||
if (cache_path.empty()) {
|
||||
cache = new net::HttpCache(NULL, 0);
|
||||
cache = new net::HttpCache(proxy_service_, 0);
|
||||
} else {
|
||||
cache = new net::HttpCache(NULL, cache_path, 0);
|
||||
cache = new net::HttpCache(proxy_service_, cache_path, 0);
|
||||
}
|
||||
cache->set_mode(cache_mode);
|
||||
http_transaction_factory_ = cache;
|
||||
|
@ -43,5 +50,6 @@ void BrowserRequestContext::Init(
|
|||
BrowserRequestContext::~BrowserRequestContext() {
|
||||
delete cookie_store_;
|
||||
delete http_transaction_factory_;
|
||||
delete proxy_service_;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,12 +18,14 @@ class BrowserRequestContext : public URLRequestContext {
|
|||
// Use an on-disk cache at the specified location. Optionally, use the cache
|
||||
// in playback or record mode.
|
||||
BrowserRequestContext(const std::wstring& cache_path,
|
||||
net::HttpCache::Mode cache_mode);
|
||||
net::HttpCache::Mode cache_mode,
|
||||
bool no_proxy);
|
||||
|
||||
~BrowserRequestContext();
|
||||
|
||||
private:
|
||||
void Init(const std::wstring& cache_path, net::HttpCache::Mode cache_mode);
|
||||
void Init(const std::wstring& cache_path, net::HttpCache::Mode cache_mode,
|
||||
bool no_proxy);
|
||||
};
|
||||
|
||||
#endif // _BROWSER_REQUEST_CONTEXT_H
|
||||
|
|
|
@ -56,7 +56,7 @@ bool DownloadUrl(const std::string& url, HWND caller_window) {
|
|||
return false;
|
||||
}
|
||||
|
||||
ScreenInfo GetScreenInfo(gfx::ViewHandle window) {
|
||||
ScreenInfo GetScreenInfo(gfx::NativeView window) {
|
||||
return GetScreenInfoHelper(window);
|
||||
}
|
||||
|
||||
|
|
|
@ -468,7 +468,7 @@ void BrowserWebViewDelegate::SetUserStyleSheetLocation(const GURL& location) {
|
|||
|
||||
// WebWidgetDelegate ---------------------------------------------------------
|
||||
|
||||
gfx::ViewHandle BrowserWebViewDelegate::GetContainingWindow(WebWidget* webwidget) {
|
||||
gfx::NativeView BrowserWebViewDelegate::GetContainingWindow(WebWidget* webwidget) {
|
||||
if (WebWidgetHost* host = GetHostForWidget(webwidget))
|
||||
return host->window_handle();
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ class BrowserWebViewDelegate : public base::RefCounted<BrowserWebViewDelegate>,
|
|||
virtual int GetHistoryForwardListCount();
|
||||
|
||||
// WebWidgetDelegate
|
||||
virtual gfx::ViewHandle GetContainingWindow(WebWidget* webwidget);
|
||||
virtual gfx::NativeView GetContainingWindow(WebWidget* webwidget);
|
||||
virtual void DidInvalidateRect(WebWidget* webwidget, const gfx::Rect& rect);
|
||||
virtual void DidScrollRect(WebWidget* webwidget, int dx, int dy,
|
||||
const gfx::Rect& clip_rect);
|
||||
|
|
|
@ -98,7 +98,7 @@ DWORD WINAPI ThreadHandlerUI(LPVOID lpParam)
|
|||
std::wstring cache_path;
|
||||
PathService::Get(base::DIR_EXE, &cache_path);
|
||||
BrowserResourceLoaderBridge::Init(
|
||||
new BrowserRequestContext(cache_path, net::HttpCache::NORMAL));
|
||||
new BrowserRequestContext(cache_path, net::HttpCache::NORMAL, false));
|
||||
|
||||
// Load ICU data tables.
|
||||
bool ret = icu_util::Initialize();
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(OutDir)\obj\WebCore";"$(OutDir)\obj\WebCore\JavaScriptHeaders";"$(OutDir)\obj\WebCore\JavaScriptHeaders\JavaScriptCore";"$(SolutionDir)..\webkit\pending\";"$(SolutionDir)..\webkit\pending\kjs";"$(SolutionDir)..\webkit\pending\wtf";"$(SolutionDir)..\webkit\port\bridge";"$(SolutionDir)..\webkit\port\css";"$(SolutionDir)..\webkit\port\dom";"$(SolutionDir)..\webkit\port\history";"$(SolutionDir)..\webkit\port\loader";"$(SolutionDir)..\webkit\port\page";"$(SolutionDir)..\webkit\port\page\chromium";"$(SolutionDir)..\webkit\port\page\win";"$(SolutionDir)..\webkit\port\platform";"$(SolutionDir)..\webkit\port\platform\chromium";"$(SolutionDir)..\webkit\port\platform\win";"$(SolutionDir)..\webkit\port\platform\network\chromium";"$(SolutionDir)..\webkit\port\platform\image-decoders";"$(SolutionDir)..\webkit\port\platform\image-decoders\bmp";"$(SolutionDir)..\webkit\port\platform\image-decoders\gif";"$(SolutionDir)..\webkit\port\platform\image-decoders\ico";"$(SolutionDir)..\webkit\port\platform\image-decoders\jpeg";"$(SolutionDir)..\webkit\port\platform\image-decoders\png";"$(SolutionDir)..\webkit\port\platform\image-decoders\xbm";"$(SolutionDir)..\webkit\port\platform\network";"$(SolutionDir)..\webkit\port\plugins";"$(SolutionDir)..\webkit\port\rendering";"$(SolutionDir)..\webkit\port\platform\graphics";"$(SolutionDir)..\webkit\port\platform\graphics\chromium";"$(SolutionDir)..\webkit";"$(SolutionDir)..\webkit\build";"$(ProjectDir)";"$(SolutionDir)..\third_party\WebKit\WebCore\";"$(SolutionDir)..\third_party\WebKit\WebCore\bridge";"$(SolutionDir)..\third_party\WebKit\WebCore\bridge\c";"$(SolutionDir)..\third_party\WebKit\WebCore\css";"$(SolutionDir)..\third_party\WebKit\WebCore\dom";"$(SolutionDir)..\third_party\WebKit\WebCore\editing";"$(SolutionDir)..\third_party\WebKit\WebCore\history";"$(SolutionDir)..\third_party\WebKit\WebCore\html";"$(SolutionDir)..\third_party\WebKit\WebCore\loader";"$(SolutionDir)..\third_party\WebKit\WebCore\loader\appcache";"$(SolutionDir)..\third_party\WebKit\WebCore\loader\archive";"$(SolutionDir)..\third_party\WebKit\WebCore\loader\icon";"$(SolutionDir)..\third_party\WebKit\WebCore\page";"$(SolutionDir)..\third_party\WebKit\WebCore\platform";"$(SolutionDir)..\third_party\WebKit\WebCore\page\animation";"$(SolutionDir)..\third_party\WebKit\WebCore\platform\text";"$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics";"$(SolutionDir)..\third_party\WebKit\WebCore\svg\graphics";"$(SolutionDir)..\third_party\WebKit\WebCore\platform\network";"$(SolutionDir)..\third_party\WebKit\WebCore\platform\sql";"$(SolutionDir)..\third_party\WebKit\WebCore\rendering";"$(SolutionDir)..\third_party\WebKit\WebCore\rendering\style";"$(SolutionDir)..\third_party\WebKit\WebCore\storage";"$(SolutionDir)..\third_party\WebKit\WebCore\xml";"$(SolutionDir)..\third_party\WebKit\WebCore";"$(SolutionDir)..\third_party\WebKit\WebCore\os-win32";"$(SolutionDir)..\third_party\WebKit\WebCore\wtf";"$(SolutionDir)..\third_party\WebKit\JavaScriptCore";"$(SolutionDir)..\third_party\WebKit\JavaScriptCore\wtf";"$(SolutionDir)..\third_party\WebKit\JavaScriptCore\os-win32";"$(SolutionDir)..\third_party\WebKit\WebCore\svg";"$(SolutionDir)..\third_party\WebKit\WebCore\svg\animation";"$(SolutionDir)..\third_party\WebKit\WebCore\svg\graphics\filters";"$(SolutionDir)..\third_party\WebKit\WebCore\plugins";"$(SolutionDir)..\third_party\WebKit\WebCore\inspector";"$(SolutionDir)..\third_party\sqlite";"$(SDKIncludes)";"$(IntDir)\..\WebCore\DerivedSources";"
|
||||
AdditionalIncludeDirectories=""$(OutDir)\obj\WebCore";"$(OutDir)\obj\WebCore\JavaScriptHeaders";"$(OutDir)\obj\WebCore\JavaScriptHeaders\JavaScriptCore";"$(SolutionDir)..\webkit\pending\";"$(SolutionDir)..\webkit\pending\kjs";"$(SolutionDir)..\webkit\pending\wtf";"$(SolutionDir)..\webkit\port\bridge";"$(SolutionDir)..\webkit\port\css";"$(SolutionDir)..\webkit\port\dom";"$(SolutionDir)..\webkit\port\history";"$(SolutionDir)..\webkit\port\loader";"$(SolutionDir)..\webkit\port\page";"$(SolutionDir)..\webkit\port\page\chromium";"$(SolutionDir)..\webkit\port\page\win";"$(SolutionDir)..\webkit\port\platform";"$(SolutionDir)..\webkit\port\platform\chromium";"$(SolutionDir)..\webkit\port\platform\win";"$(SolutionDir)..\webkit\port\platform\network\chromium";"$(SolutionDir)..\webkit\port\platform\image-decoders";"$(SolutionDir)..\webkit\port\platform\image-decoders\bmp";"$(SolutionDir)..\webkit\port\platform\image-decoders\gif";"$(SolutionDir)..\webkit\port\platform\image-decoders\ico";"$(SolutionDir)..\webkit\port\platform\image-decoders\jpeg";"$(SolutionDir)..\webkit\port\platform\image-decoders\png";"$(SolutionDir)..\webkit\port\platform\image-decoders\xbm";"$(SolutionDir)..\webkit\port\platform\network";"$(SolutionDir)..\webkit\port\plugins";"$(SolutionDir)..\webkit\port\rendering";"$(SolutionDir)..\webkit\port\platform\graphics";"$(SolutionDir)..\webkit\port\platform\graphics\chromium";"$(SolutionDir)..\webkit\port\platform\graphics\skia";"$(SolutionDir)..\webkit";"$(SolutionDir)..\webkit\build";"$(ProjectDir)";"$(SolutionDir)..\third_party\WebKit\WebCore\";"$(SolutionDir)..\third_party\WebKit\WebCore\bridge";"$(SolutionDir)..\third_party\WebKit\WebCore\bridge\c";"$(SolutionDir)..\third_party\WebKit\WebCore\css";"$(SolutionDir)..\third_party\WebKit\WebCore\dom";"$(SolutionDir)..\third_party\WebKit\WebCore\editing";"$(SolutionDir)..\third_party\WebKit\WebCore\history";"$(SolutionDir)..\third_party\WebKit\WebCore\html";"$(SolutionDir)..\third_party\WebKit\WebCore\loader";"$(SolutionDir)..\third_party\WebKit\WebCore\loader\appcache";"$(SolutionDir)..\third_party\WebKit\WebCore\loader\archive";"$(SolutionDir)..\third_party\WebKit\WebCore\loader\icon";"$(SolutionDir)..\third_party\WebKit\WebCore\page";"$(SolutionDir)..\third_party\WebKit\WebCore\platform";"$(SolutionDir)..\third_party\WebKit\WebCore\page\animation";"$(SolutionDir)..\third_party\WebKit\WebCore\platform\text";"$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics";"$(SolutionDir)..\third_party\WebKit\WebCore\svg\graphics";"$(SolutionDir)..\third_party\WebKit\WebCore\platform\network";"$(SolutionDir)..\third_party\WebKit\WebCore\platform\sql";"$(SolutionDir)..\third_party\WebKit\WebCore\rendering";"$(SolutionDir)..\third_party\WebKit\WebCore\rendering\style";"$(SolutionDir)..\third_party\WebKit\WebCore\storage";"$(SolutionDir)..\third_party\WebKit\WebCore\xml";"$(SolutionDir)..\third_party\WebKit\WebCore";"$(SolutionDir)..\third_party\WebKit\WebCore\os-win32";"$(SolutionDir)..\third_party\WebKit\WebCore\wtf";"$(SolutionDir)..\third_party\WebKit\JavaScriptCore";"$(SolutionDir)..\third_party\WebKit\JavaScriptCore\wtf";"$(SolutionDir)..\third_party\WebKit\JavaScriptCore\os-win32";"$(SolutionDir)..\third_party\WebKit\WebCore\svg";"$(SolutionDir)..\third_party\WebKit\WebCore\svg\animation";"$(SolutionDir)..\third_party\WebKit\WebCore\svg\graphics\filters";"$(SolutionDir)..\third_party\WebKit\WebCore\plugins";"$(SolutionDir)..\third_party\WebKit\WebCore\inspector";"$(SolutionDir)..\third_party\sqlite";"$(SDKIncludes)";"$(IntDir)\..\WebCore\DerivedSources";"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
static const wchar_t kWindowClassName[] = L"WebViewHost";
|
||||
|
||||
/*static*/
|
||||
WebViewHost* WebViewHost::Create(gfx::WindowHandle parent_window,
|
||||
WebViewHost* WebViewHost::Create(gfx::NativeWindow parent_window,
|
||||
WebViewDelegate* delegate,
|
||||
const WebPreferences& prefs) {
|
||||
WebViewHost* host = new WebViewHost();
|
||||
|
|
|
@ -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::WindowHandle parent_window,
|
||||
static WebViewHost* Create(gfx::NativeWindow parent_window,
|
||||
WebViewDelegate* delegate,
|
||||
const WebPreferences& prefs);
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
static const wchar_t kWindowClassName[] = L"WebWidgetHost";
|
||||
|
||||
/*static*/
|
||||
WebWidgetHost* WebWidgetHost::Create(gfx::WindowHandle parent_window,
|
||||
WebWidgetHost* WebWidgetHost::Create(gfx::NativeWindow parent_window,
|
||||
WebWidgetDelegate* delegate) {
|
||||
WebWidgetHost* host = new WebWidgetHost();
|
||||
|
||||
|
@ -45,7 +45,7 @@ WebWidgetHost* WebWidgetHost::Create(gfx::WindowHandle parent_window,
|
|||
}
|
||||
|
||||
/*static*/
|
||||
WebWidgetHost* WebWidgetHost::FromWindow(gfx::WindowHandle hwnd) {
|
||||
WebWidgetHost* WebWidgetHost::FromWindow(gfx::NativeWindow hwnd) {
|
||||
return reinterpret_cast<WebWidgetHost*>(win_util::GetWindowUserData(hwnd));
|
||||
}
|
||||
|
||||
|
|
|
@ -24,15 +24,15 @@ 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::WindowHandle parent_window,
|
||||
static WebWidgetHost* Create(gfx::NativeWindow parent_window,
|
||||
WebWidgetDelegate* delegate);
|
||||
|
||||
static WebWidgetHost* FromWindow(gfx::WindowHandle view);
|
||||
static WebWidgetHost* FromWindow(gfx::NativeWindow view);
|
||||
#if defined(OS_MACOSX)
|
||||
static void HandleEvent(gfx::WindowHandle window, NSEvent *event);
|
||||
static void HandleEvent(gfx::NativeWindow window, NSEvent *event);
|
||||
#endif
|
||||
|
||||
gfx::ViewHandle window_handle() const { return view_; }
|
||||
gfx::NativeView window_handle() const { return view_; }
|
||||
WebWidget* webwidget() const { return webwidget_; }
|
||||
|
||||
void DidInvalidateRect(const gfx::Rect& rect);
|
||||
|
@ -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::WindowHandle CreateWindow(gfx::WindowHandle parent, void* host);
|
||||
static gfx::NativeWindow CreateWindow(gfx::NativeWindow parent, void* host);
|
||||
void WindowDestroyed();
|
||||
void Resize(const gfx::Size& size);
|
||||
#endif
|
||||
|
@ -98,7 +98,7 @@ class WebWidgetHost {
|
|||
#endif
|
||||
}
|
||||
|
||||
gfx::ViewHandle view_;
|
||||
gfx::NativeView view_;
|
||||
WebWidget* webwidget_;
|
||||
scoped_ptr<gfx::PlatformCanvas> canvas_;
|
||||
|
||||
|
|
Loading…
Reference in New Issue