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:
@@ -34,6 +34,11 @@ namespace content {
|
||||
struct NativeWebKeyboardEvent;
|
||||
}
|
||||
|
||||
namespace WebKit {
|
||||
class WebMouseEvent;
|
||||
class WebMouseWheelEvent;
|
||||
}
|
||||
|
||||
namespace net {
|
||||
class URLRequest;
|
||||
}
|
||||
@@ -97,6 +102,9 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||
static CefRefPtr<CefBrowserHostImpl> GetBrowserByChildID(
|
||||
int render_process_id);
|
||||
|
||||
// Returns true if window rendering is disabled in CefWindowInfo.
|
||||
static bool IsWindowRenderingDisabled(const CefWindowInfo& info);
|
||||
|
||||
// CefBrowserHost methods.
|
||||
virtual CefRefPtr<CefBrowser> GetBrowser() OVERRIDE;
|
||||
virtual void CloseBrowser() OVERRIDE;
|
||||
@@ -114,6 +122,17 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||
const CefString& default_file_name,
|
||||
const std::vector<CefString>& accept_types,
|
||||
CefRefPtr<CefRunFileDialogCallback> callback) OVERRIDE;
|
||||
virtual bool IsWindowRenderingDisabled() OVERRIDE;
|
||||
virtual void WasResized() OVERRIDE;
|
||||
virtual void Invalidate(const CefRect& dirtyRect) OVERRIDE;
|
||||
virtual void SendKeyEvent(const CefKeyEvent& event) OVERRIDE;
|
||||
virtual void SendMouseClickEvent(int x, int y, MouseButtonType type,
|
||||
bool mouseUp, int clickCount) OVERRIDE;
|
||||
virtual void SendMouseMoveEvent(int x, int y, bool mouseLeave) OVERRIDE;
|
||||
virtual void SendMouseWheelEvent(int x, int y,
|
||||
int deltaX, int deltaY) OVERRIDE;
|
||||
virtual void SendFocusEvent(bool setFocus) OVERRIDE;
|
||||
virtual void SendCaptureLostEvent() OVERRIDE;
|
||||
|
||||
// CefBrowser methods.
|
||||
virtual CefRefPtr<CefBrowserHost> GetHost() OVERRIDE;
|
||||
@@ -139,6 +158,11 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||
CefProcessId target_process,
|
||||
CefRefPtr<CefProcessMessage> message) OVERRIDE;
|
||||
|
||||
|
||||
// Call LifeSpanHandler before destroying. Returns true if destruction
|
||||
// is allowed at this time.
|
||||
bool AllowDestroyBrowser();
|
||||
|
||||
// Destroy the browser members. This method should only be called after the
|
||||
// native browser window is not longer processing messages.
|
||||
void DestroyBrowser();
|
||||
@@ -368,6 +392,17 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||
void PlatformRunFileChooser(const content::FileChooserParams& params,
|
||||
RunFileChooserCallback callback);
|
||||
|
||||
static bool PlatformTranslateKeyEvent(gfx::NativeEvent& native_event,
|
||||
const CefKeyEvent& key_event);
|
||||
static bool PlatformTranslateClickEvent(WebKit::WebMouseEvent& ev,
|
||||
int x, int y, MouseButtonType type,
|
||||
bool mouseUp, int clickCount);
|
||||
static bool PlatformTranslateMoveEvent(WebKit::WebMouseEvent& ev,
|
||||
int x, int y, bool mouseLeave);
|
||||
static bool PlatformTranslateWheelEvent(WebKit::WebMouseWheelEvent& ev,
|
||||
int x, int y,
|
||||
int deltaX, int deltaY);
|
||||
|
||||
void OnAddressChange(CefRefPtr<CefFrame> frame,
|
||||
const GURL& url);
|
||||
void OnLoadStart(CefRefPtr<CefFrame> frame,
|
||||
|
Reference in New Issue
Block a user