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-02 | /trunk@2 | /trunk@6213
|
||||||
2008-12-05 | /trunk@3 | /trunk@6430
|
2008-12-05 | /trunk@3 | /trunk@6430
|
||||||
|
2008-12-13 | /trunk@4 | /trunk@6968
|
||||||
|
|
|
@ -7,21 +7,24 @@
|
||||||
#include "browser_request_context.h"
|
#include "browser_request_context.h"
|
||||||
|
|
||||||
#include "net/base/cookie_monster.h"
|
#include "net/base/cookie_monster.h"
|
||||||
|
#include "net/proxy/proxy_service.h"
|
||||||
#include "webkit/glue/webkit_glue.h"
|
#include "webkit/glue/webkit_glue.h"
|
||||||
|
|
||||||
BrowserRequestContext::BrowserRequestContext() {
|
BrowserRequestContext::BrowserRequestContext() {
|
||||||
Init(std::wstring(), net::HttpCache::NORMAL);
|
Init(std::wstring(), net::HttpCache::NORMAL, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
BrowserRequestContext::BrowserRequestContext(
|
BrowserRequestContext::BrowserRequestContext(
|
||||||
const std::wstring& cache_path,
|
const std::wstring& cache_path,
|
||||||
net::HttpCache::Mode cache_mode) {
|
net::HttpCache::Mode cache_mode,
|
||||||
Init(cache_path, cache_mode);
|
bool no_proxy) {
|
||||||
|
Init(cache_path, cache_mode, no_proxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserRequestContext::Init(
|
void BrowserRequestContext::Init(
|
||||||
const std::wstring& cache_path,
|
const std::wstring& cache_path,
|
||||||
net::HttpCache::Mode cache_mode) {
|
net::HttpCache::Mode cache_mode,
|
||||||
|
bool no_proxy) {
|
||||||
cookie_store_ = new net::CookieMonster();
|
cookie_store_ = new net::CookieMonster();
|
||||||
|
|
||||||
user_agent_ = webkit_glue::GetUserAgent();
|
user_agent_ = webkit_glue::GetUserAgent();
|
||||||
|
@ -30,11 +33,15 @@ void BrowserRequestContext::Init(
|
||||||
accept_language_ = "en-us,en";
|
accept_language_ = "en-us,en";
|
||||||
accept_charset_ = "iso-8859-1,*,utf-8";
|
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;
|
net::HttpCache *cache;
|
||||||
if (cache_path.empty()) {
|
if (cache_path.empty()) {
|
||||||
cache = new net::HttpCache(NULL, 0);
|
cache = new net::HttpCache(proxy_service_, 0);
|
||||||
} else {
|
} else {
|
||||||
cache = new net::HttpCache(NULL, cache_path, 0);
|
cache = new net::HttpCache(proxy_service_, cache_path, 0);
|
||||||
}
|
}
|
||||||
cache->set_mode(cache_mode);
|
cache->set_mode(cache_mode);
|
||||||
http_transaction_factory_ = cache;
|
http_transaction_factory_ = cache;
|
||||||
|
@ -43,5 +50,6 @@ void BrowserRequestContext::Init(
|
||||||
BrowserRequestContext::~BrowserRequestContext() {
|
BrowserRequestContext::~BrowserRequestContext() {
|
||||||
delete cookie_store_;
|
delete cookie_store_;
|
||||||
delete http_transaction_factory_;
|
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
|
// Use an on-disk cache at the specified location. Optionally, use the cache
|
||||||
// in playback or record mode.
|
// in playback or record mode.
|
||||||
BrowserRequestContext(const std::wstring& cache_path,
|
BrowserRequestContext(const std::wstring& cache_path,
|
||||||
net::HttpCache::Mode cache_mode);
|
net::HttpCache::Mode cache_mode,
|
||||||
|
bool no_proxy);
|
||||||
|
|
||||||
~BrowserRequestContext();
|
~BrowserRequestContext();
|
||||||
|
|
||||||
private:
|
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
|
#endif // _BROWSER_REQUEST_CONTEXT_H
|
||||||
|
|
|
@ -1,106 +1,106 @@
|
||||||
// Copyright (c) 2008 The Chromium Embedded Framework Authors.
|
// Copyright (c) 2008 The Chromium Embedded Framework Authors.
|
||||||
// Portions copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
|
// Portions copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
#include "precompiled_libcef.h"
|
#include "precompiled_libcef.h"
|
||||||
#include "browser_webkit_glue.h"
|
#include "browser_webkit_glue.h"
|
||||||
|
|
||||||
#include <atlcore.h>
|
#include <atlcore.h>
|
||||||
#include <atlbase.h>
|
#include <atlbase.h>
|
||||||
#include <commdlg.h>
|
#include <commdlg.h>
|
||||||
|
|
||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "webkit_version.h"
|
#include "webkit_version.h"
|
||||||
MSVC_PUSH_WARNING_LEVEL(0);
|
MSVC_PUSH_WARNING_LEVEL(0);
|
||||||
#include "PlatformContextSkia.h"
|
#include "PlatformContextSkia.h"
|
||||||
MSVC_POP_WARNING();
|
MSVC_POP_WARNING();
|
||||||
|
|
||||||
#undef LOG
|
#undef LOG
|
||||||
#include "base/gfx/gdi_util.h"
|
#include "base/gfx/gdi_util.h"
|
||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
#include "webkit/glue/webkit_glue.h"
|
#include "webkit/glue/webkit_glue.h"
|
||||||
#include "webkit/glue/webview.h"
|
#include "webkit/glue/webview.h"
|
||||||
#include "webkit/glue/plugins/plugin_list.h"
|
#include "webkit/glue/plugins/plugin_list.h"
|
||||||
|
|
||||||
|
|
||||||
namespace webkit_glue {
|
namespace webkit_glue {
|
||||||
|
|
||||||
std::wstring GetLocalizedString(int message_id) {
|
std::wstring GetLocalizedString(int message_id) {
|
||||||
const ATLSTRINGRESOURCEIMAGE* image =
|
const ATLSTRINGRESOURCEIMAGE* image =
|
||||||
AtlGetStringResourceImage(_AtlBaseModule.GetModuleInstance(),
|
AtlGetStringResourceImage(_AtlBaseModule.GetModuleInstance(),
|
||||||
message_id);
|
message_id);
|
||||||
// TODO(cef): Need to provide strings for common resources.
|
// TODO(cef): Need to provide strings for common resources.
|
||||||
if (!image) {
|
if (!image) {
|
||||||
NOTREACHED();
|
NOTREACHED();
|
||||||
return L"No string for this identifier!";
|
return L"No string for this identifier!";
|
||||||
}
|
}
|
||||||
return std::wstring(image->achString, image->nLength);
|
return std::wstring(image->achString, image->nLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
HCURSOR LoadCursor(int cursor_id) {
|
HCURSOR LoadCursor(int cursor_id) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) {
|
bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) {
|
||||||
return NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins);
|
return NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EnsureFontLoaded(HFONT font) {
|
bool EnsureFontLoaded(HFONT font) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DownloadUrl(const std::string& url, HWND caller_window) {
|
bool DownloadUrl(const std::string& url, HWND caller_window) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ScreenInfo GetScreenInfo(gfx::ViewHandle window) {
|
ScreenInfo GetScreenInfo(gfx::NativeView window) {
|
||||||
return GetScreenInfoHelper(window);
|
return GetScreenInfoHelper(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CaptureWebViewBitmap(HWND mainWnd, WebView* webview, HBITMAP& bitmap, SIZE& size)
|
void CaptureWebViewBitmap(HWND mainWnd, WebView* webview, HBITMAP& bitmap, SIZE& size)
|
||||||
{
|
{
|
||||||
gfx::Size webSize = webview->GetSize();
|
gfx::Size webSize = webview->GetSize();
|
||||||
size.cx = webSize.width();
|
size.cx = webSize.width();
|
||||||
size.cy = webSize.height();
|
size.cy = webSize.height();
|
||||||
|
|
||||||
gfx::PlatformCanvasWin canvas(size.cx, size.cy, true);
|
gfx::PlatformCanvasWin canvas(size.cx, size.cy, true);
|
||||||
canvas.drawARGB(255, 255, 255, 255, SkPorterDuff::kSrc_Mode);
|
canvas.drawARGB(255, 255, 255, 255, SkPorterDuff::kSrc_Mode);
|
||||||
PlatformContextSkia context(&canvas);
|
PlatformContextSkia context(&canvas);
|
||||||
gfx::Rect rect(size.cx, size.cy);
|
gfx::Rect rect(size.cx, size.cy);
|
||||||
webview->Layout();
|
webview->Layout();
|
||||||
webview->Paint(&canvas, rect);
|
webview->Paint(&canvas, rect);
|
||||||
|
|
||||||
HDC hRefDC = GetDC(mainWnd);
|
HDC hRefDC = GetDC(mainWnd);
|
||||||
HDC hDC = CreateCompatibleDC(hRefDC);
|
HDC hDC = CreateCompatibleDC(hRefDC);
|
||||||
bitmap = CreateCompatibleBitmap(hRefDC, size.cx, size.cy);
|
bitmap = CreateCompatibleBitmap(hRefDC, size.cx, size.cy);
|
||||||
DCHECK(bitmap != NULL);
|
DCHECK(bitmap != NULL);
|
||||||
HBITMAP hOldBmp = (HBITMAP)SelectObject(hDC, bitmap);
|
HBITMAP hOldBmp = (HBITMAP)SelectObject(hDC, bitmap);
|
||||||
|
|
||||||
// Create a BMP v4 header that we can serialize.
|
// Create a BMP v4 header that we can serialize.
|
||||||
BITMAPV4HEADER bitmap_header;
|
BITMAPV4HEADER bitmap_header;
|
||||||
gfx::CreateBitmapV4Header(size.cx, size.cy, &bitmap_header);
|
gfx::CreateBitmapV4Header(size.cx, size.cy, &bitmap_header);
|
||||||
const SkBitmap& src_bmp = canvas.getDevice()->accessBitmap(true);
|
const SkBitmap& src_bmp = canvas.getDevice()->accessBitmap(true);
|
||||||
SkAutoLockPixels src_lock(src_bmp);
|
SkAutoLockPixels src_lock(src_bmp);
|
||||||
int retval = StretchDIBits(hDC,
|
int retval = StretchDIBits(hDC,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
size.cx, size.cy,
|
size.cx, size.cy,
|
||||||
0, 0,
|
0, 0,
|
||||||
size.cx, size.cy,
|
size.cx, size.cy,
|
||||||
src_bmp.getPixels(),
|
src_bmp.getPixels(),
|
||||||
reinterpret_cast<BITMAPINFO*>(&bitmap_header),
|
reinterpret_cast<BITMAPINFO*>(&bitmap_header),
|
||||||
DIB_RGB_COLORS,
|
DIB_RGB_COLORS,
|
||||||
SRCCOPY);
|
SRCCOPY);
|
||||||
DCHECK(retval != GDI_ERROR);
|
DCHECK(retval != GDI_ERROR);
|
||||||
|
|
||||||
SelectObject(hDC, hOldBmp);
|
SelectObject(hDC, hOldBmp);
|
||||||
DeleteDC(hDC);
|
DeleteDC(hDC);
|
||||||
ReleaseDC(mainWnd, hRefDC);
|
ReleaseDC(mainWnd, hRefDC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static PBITMAPINFO BmpCreateInfo(HBITMAP hBmp)
|
static PBITMAPINFO BmpCreateInfo(HBITMAP hBmp)
|
||||||
{
|
{
|
||||||
|
@ -286,6 +286,6 @@ BOOL SaveBitmapToFile(HBITMAP hBmp, HDC hDC, LPCTSTR file, LPBYTE lpBits)
|
||||||
LocalFree(pbmi);
|
LocalFree(pbmi);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace webkit_glue
|
} // namespace webkit_glue
|
||||||
|
|
|
@ -468,7 +468,7 @@ void BrowserWebViewDelegate::SetUserStyleSheetLocation(const GURL& location) {
|
||||||
|
|
||||||
// WebWidgetDelegate ---------------------------------------------------------
|
// WebWidgetDelegate ---------------------------------------------------------
|
||||||
|
|
||||||
gfx::ViewHandle BrowserWebViewDelegate::GetContainingWindow(WebWidget* webwidget) {
|
gfx::NativeView BrowserWebViewDelegate::GetContainingWindow(WebWidget* webwidget) {
|
||||||
if (WebWidgetHost* host = GetHostForWidget(webwidget))
|
if (WebWidgetHost* host = GetHostForWidget(webwidget))
|
||||||
return host->window_handle();
|
return host->window_handle();
|
||||||
|
|
||||||
|
|
|
@ -179,7 +179,7 @@ class BrowserWebViewDelegate : public base::RefCounted<BrowserWebViewDelegate>,
|
||||||
virtual int GetHistoryForwardListCount();
|
virtual int GetHistoryForwardListCount();
|
||||||
|
|
||||||
// WebWidgetDelegate
|
// WebWidgetDelegate
|
||||||
virtual gfx::ViewHandle GetContainingWindow(WebWidget* webwidget);
|
virtual gfx::NativeView GetContainingWindow(WebWidget* webwidget);
|
||||||
virtual void DidInvalidateRect(WebWidget* webwidget, const gfx::Rect& rect);
|
virtual void DidInvalidateRect(WebWidget* webwidget, const gfx::Rect& rect);
|
||||||
virtual void DidScrollRect(WebWidget* webwidget, int dx, int dy,
|
virtual void DidScrollRect(WebWidget* webwidget, int dx, int dy,
|
||||||
const gfx::Rect& clip_rect);
|
const gfx::Rect& clip_rect);
|
||||||
|
@ -192,7 +192,7 @@ class BrowserWebViewDelegate : public base::RefCounted<BrowserWebViewDelegate>,
|
||||||
virtual void GetWindowRect(WebWidget* webwidget, gfx::Rect* rect);
|
virtual void GetWindowRect(WebWidget* webwidget, gfx::Rect* rect);
|
||||||
virtual void SetWindowRect(WebWidget* webwidget, const gfx::Rect& rect);
|
virtual void SetWindowRect(WebWidget* webwidget, const gfx::Rect& rect);
|
||||||
virtual void GetRootWindowRect(WebWidget *,gfx::Rect *);
|
virtual void GetRootWindowRect(WebWidget *,gfx::Rect *);
|
||||||
virtual void GetRootWindowResizerRect(WebWidget* webwidget, gfx::Rect* rect);
|
virtual void GetRootWindowResizerRect(WebWidget* webwidget, gfx::Rect* rect);
|
||||||
virtual void DidMove(WebWidget* webwidget, const WebPluginGeometry& move);
|
virtual void DidMove(WebWidget* webwidget, const WebPluginGeometry& move);
|
||||||
virtual void RunModal(WebWidget* webwidget);
|
virtual void RunModal(WebWidget* webwidget);
|
||||||
virtual bool IsHidden();
|
virtual bool IsHidden();
|
||||||
|
|
|
@ -98,7 +98,7 @@ DWORD WINAPI ThreadHandlerUI(LPVOID lpParam)
|
||||||
std::wstring cache_path;
|
std::wstring cache_path;
|
||||||
PathService::Get(base::DIR_EXE, &cache_path);
|
PathService::Get(base::DIR_EXE, &cache_path);
|
||||||
BrowserResourceLoaderBridge::Init(
|
BrowserResourceLoaderBridge::Init(
|
||||||
new BrowserRequestContext(cache_path, net::HttpCache::NORMAL));
|
new BrowserRequestContext(cache_path, net::HttpCache::NORMAL, false));
|
||||||
|
|
||||||
// Load ICU data tables.
|
// Load ICU data tables.
|
||||||
bool ret = icu_util::Initialize();
|
bool ret = icu_util::Initialize();
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
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>
|
</VisualStudioPropertySheet>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
static const wchar_t kWindowClassName[] = L"WebViewHost";
|
static const wchar_t kWindowClassName[] = L"WebViewHost";
|
||||||
|
|
||||||
/*static*/
|
/*static*/
|
||||||
WebViewHost* WebViewHost::Create(gfx::WindowHandle parent_window,
|
WebViewHost* WebViewHost::Create(gfx::NativeWindow parent_window,
|
||||||
WebViewDelegate* delegate,
|
WebViewDelegate* delegate,
|
||||||
const WebPreferences& prefs) {
|
const WebPreferences& prefs) {
|
||||||
WebViewHost* host = new WebViewHost();
|
WebViewHost* host = new WebViewHost();
|
||||||
|
|
|
@ -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::WindowHandle parent_window,
|
static WebViewHost* Create(gfx::NativeWindow parent_window,
|
||||||
WebViewDelegate* delegate,
|
WebViewDelegate* delegate,
|
||||||
const WebPreferences& prefs);
|
const WebPreferences& prefs);
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
static const wchar_t kWindowClassName[] = L"WebWidgetHost";
|
static const wchar_t kWindowClassName[] = L"WebWidgetHost";
|
||||||
|
|
||||||
/*static*/
|
/*static*/
|
||||||
WebWidgetHost* WebWidgetHost::Create(gfx::WindowHandle parent_window,
|
WebWidgetHost* WebWidgetHost::Create(gfx::NativeWindow parent_window,
|
||||||
WebWidgetDelegate* delegate) {
|
WebWidgetDelegate* delegate) {
|
||||||
WebWidgetHost* host = new WebWidgetHost();
|
WebWidgetHost* host = new WebWidgetHost();
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ WebWidgetHost* WebWidgetHost::Create(gfx::WindowHandle parent_window,
|
||||||
}
|
}
|
||||||
|
|
||||||
/*static*/
|
/*static*/
|
||||||
WebWidgetHost* WebWidgetHost::FromWindow(gfx::WindowHandle hwnd) {
|
WebWidgetHost* WebWidgetHost::FromWindow(gfx::NativeWindow hwnd) {
|
||||||
return reinterpret_cast<WebWidgetHost*>(win_util::GetWindowUserData(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 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::WindowHandle parent_window,
|
static WebWidgetHost* Create(gfx::NativeWindow parent_window,
|
||||||
WebWidgetDelegate* delegate);
|
WebWidgetDelegate* delegate);
|
||||||
|
|
||||||
static WebWidgetHost* FromWindow(gfx::WindowHandle view);
|
static WebWidgetHost* FromWindow(gfx::NativeWindow view);
|
||||||
#if defined(OS_MACOSX)
|
#if defined(OS_MACOSX)
|
||||||
static void HandleEvent(gfx::WindowHandle window, NSEvent *event);
|
static void HandleEvent(gfx::NativeWindow window, NSEvent *event);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gfx::ViewHandle window_handle() const { return view_; }
|
gfx::NativeView window_handle() const { return view_; }
|
||||||
WebWidget* webwidget() const { return webwidget_; }
|
WebWidget* webwidget() const { return webwidget_; }
|
||||||
|
|
||||||
void DidInvalidateRect(const gfx::Rect& rect);
|
void DidInvalidateRect(const gfx::Rect& rect);
|
||||||
|
@ -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::WindowHandle CreateWindow(gfx::WindowHandle parent, void* host);
|
static gfx::NativeWindow CreateWindow(gfx::NativeWindow parent, void* host);
|
||||||
void WindowDestroyed();
|
void WindowDestroyed();
|
||||||
void Resize(const gfx::Size& size);
|
void Resize(const gfx::Size& size);
|
||||||
#endif
|
#endif
|
||||||
|
@ -98,7 +98,7 @@ class WebWidgetHost {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::ViewHandle view_;
|
gfx::NativeView view_;
|
||||||
WebWidget* webwidget_;
|
WebWidget* webwidget_;
|
||||||
scoped_ptr<gfx::PlatformCanvas> canvas_;
|
scoped_ptr<gfx::PlatformCanvas> canvas_;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue