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:
Marshall Greenblatt
2012-11-21 00:40:15 +00:00
parent cd32e16c61
commit 6b7716f64b
58 changed files with 4108 additions and 17 deletions

View File

@ -211,6 +211,7 @@ class CefRunFileDialogCallback : public virtual CefBase {
class CefBrowserHost : public virtual CefBase {
public:
typedef cef_file_dialog_mode_t FileDialogMode;
typedef cef_mouse_button_type_t MouseButtonType;
///
// Create a new browser window using the window parameters specified by
@ -241,7 +242,7 @@ class CefBrowserHost : public virtual CefBase {
///
/*--cef()--*/
virtual CefRefPtr<CefBrowser> GetBrowser() =0;
///
// Call this method before destroying a contained browser window. This method
// performs any internal cleanup that may be needed before the browser window
@ -329,6 +330,70 @@ class CefBrowserHost : public virtual CefBase {
const CefString& default_file_name,
const std::vector<CefString>& accept_types,
CefRefPtr<CefRunFileDialogCallback> callback) =0;
///
// Returns true if window rendering is disabled.
///
/*--cef()--*/
virtual bool IsWindowRenderingDisabled() =0;
///
// Notify the browser that the widget has been resized. The browser will first
// call CefRenderHandler::GetViewRect to get the new size and then call
// CefRenderHandler::OnPaint asynchronously with the updated regions. This
// method is only used when window rendering is disabled.
///
/*--cef()--*/
virtual void WasResized() =0;
///
// Invalidate the |dirtyRect| region of the view. The browser will call
// CefRenderHandler::OnPaint asynchronously with the updated regions. This
// method is only used when window rendering is disabled.
///
/*--cef()--*/
virtual void Invalidate(const CefRect& dirtyRect) =0;
///
// Send a key event to the browser.
///
/*--cef()--*/
virtual void SendKeyEvent(const CefKeyEvent& event) =0;
///
// Send a mouse click event to the browser. The |x| and |y| coordinates are
// relative to the upper-left corner of the view.
///
/*--cef()--*/
virtual void SendMouseClickEvent(int x, int y, MouseButtonType type,
bool mouseUp, int clickCount) =0;
///
// Send a mouse move event to the browser. The |x| and |y| coordinates are
// relative to the upper-left corner of the view.
///
/*--cef()--*/
virtual void SendMouseMoveEvent(int x, int y, bool mouseLeave) =0;
///
// Send a mouse wheel event to the browser. The |x| and |y| coordinates are
// relative to the upper-left corner of the view. The |deltaX| and |deltaY|
// values represent the movement delta in the X and Y directions respectively.
///
/*--cef()--*/
virtual void SendMouseWheelEvent(int x, int y, int deltaX, int deltaY) =0;
///
// Send a focus event to the browser.
///
/*--cef()--*/
virtual void SendFocusEvent(bool setFocus) =0;
///
// Send a capture lost event to the browser.
///
/*--cef()--*/
virtual void SendCaptureLostEvent() =0;
};
#endif // CEF_INCLUDE_CEF_BROWSER_H_