mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Windows: Add off-screen rendering support (issue #518).
- Popup menus, drag&drop and GPU acceleration are not currently supported. - Testing is enabled in cefclient by passing the "off-screen-rendering-enabled" command-line flag. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@919 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -27,6 +27,7 @@ class ClientHandler : public CefClient,
|
||||
public CefKeyboardHandler,
|
||||
public CefLifeSpanHandler,
|
||||
public CefLoadHandler,
|
||||
public CefRenderHandler,
|
||||
public CefRequestHandler {
|
||||
public:
|
||||
// Interface for process message delegates. Do not perform work in the
|
||||
@@ -90,6 +91,9 @@ class ClientHandler : public CefClient,
|
||||
virtual CefRefPtr<CefLoadHandler> GetLoadHandler() OVERRIDE {
|
||||
return this;
|
||||
}
|
||||
virtual CefRefPtr<CefRenderHandler> GetRenderHandler() OVERRIDE {
|
||||
return this;
|
||||
}
|
||||
virtual CefRefPtr<CefRequestHandler> GetRequestHandler() OVERRIDE {
|
||||
return this;
|
||||
}
|
||||
@@ -152,6 +156,13 @@ class ClientHandler : public CefClient,
|
||||
virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE;
|
||||
virtual bool DoClose(CefRefPtr<CefBrowser> browser) OVERRIDE;
|
||||
virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) OVERRIDE;
|
||||
virtual bool OnBeforePopup(
|
||||
CefRefPtr<CefBrowser> parentBrowser,
|
||||
const CefPopupFeatures& popupFeatures,
|
||||
CefWindowInfo& windowInfo,
|
||||
const CefString& url,
|
||||
CefRefPtr<CefClient>& client,
|
||||
CefBrowserSettings& settings) OVERRIDE;
|
||||
|
||||
// CefLoadHandler methods
|
||||
virtual void OnLoadStart(CefRefPtr<CefBrowser> browser,
|
||||
@@ -180,9 +191,35 @@ class ClientHandler : public CefClient,
|
||||
const CefString& url,
|
||||
bool& allow_os_execution) OVERRIDE;
|
||||
|
||||
// CefRenderHandler methods
|
||||
virtual bool GetRootScreenRect(CefRefPtr<CefBrowser> browser,
|
||||
CefRect& rect) OVERRIDE;
|
||||
virtual bool GetViewRect(CefRefPtr<CefBrowser> browser,
|
||||
CefRect& rect) OVERRIDE;
|
||||
virtual bool GetScreenPoint(CefRefPtr<CefBrowser> browser,
|
||||
int viewX,
|
||||
int viewY,
|
||||
int& screenX,
|
||||
int& screenY) OVERRIDE;
|
||||
virtual void OnPopupShow(CefRefPtr<CefBrowser> browser, bool show) OVERRIDE;
|
||||
virtual void OnPopupSize(CefRefPtr<CefBrowser> browser,
|
||||
const CefRect& rect) OVERRIDE;
|
||||
virtual void OnPaint(CefRefPtr<CefBrowser> browser,
|
||||
PaintElementType type,
|
||||
const RectList& dirtyRects,
|
||||
const void* buffer,
|
||||
int width,
|
||||
int height) OVERRIDE;
|
||||
virtual void OnCursorChange(CefRefPtr<CefBrowser> browser,
|
||||
CefCursorHandle cursor) OVERRIDE;
|
||||
|
||||
void SetMainHwnd(CefWindowHandle hwnd);
|
||||
CefWindowHandle GetMainHwnd() { return m_MainHwnd; }
|
||||
void SetEditHwnd(CefWindowHandle hwnd);
|
||||
void SetOSRHandler(CefRefPtr<CefRenderHandler> handler) {
|
||||
m_OSRHandler = handler;
|
||||
}
|
||||
CefRefPtr<CefRenderHandler> GetOSRHandler() { return m_OSRHandler; }
|
||||
void SetButtonHwnds(CefWindowHandle backHwnd,
|
||||
CefWindowHandle forwardHwnd,
|
||||
CefWindowHandle reloadHwnd,
|
||||
@@ -261,6 +298,8 @@ class ClientHandler : public CefClient,
|
||||
CefWindowHandle m_StopHwnd;
|
||||
CefWindowHandle m_ReloadHwnd;
|
||||
|
||||
CefRefPtr<CefRenderHandler> m_OSRHandler;
|
||||
|
||||
// Support for logging.
|
||||
std::string m_LogFile;
|
||||
|
||||
|
Reference in New Issue
Block a user