- Add off-screen rendering support on Windows. This involves a number of new CefBrowser and CefHandler methods. See the "Off-Screen Rendering Example" in cefclient for example usage.

- Add CefRunMessageLoop() for efficient message loop usage and modify cefclient to use it.
- Add CefHandler::HandleNavStateChange() for back/forward state notifications and modify cefclient to use it.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@208 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-03-24 20:36:47 +00:00
parent 658c53e87c
commit ff983a6e72
57 changed files with 3392 additions and 379 deletions

View File

@@ -236,6 +236,110 @@ void CefBrowserCToCpp::CloseDevTools()
struct_->close_dev_tools(struct_);
}
bool CefBrowserCToCpp::IsWindowRenderingDisabled()
{
if (CEF_MEMBER_MISSING(struct_, is_window_rendering_disabled))
return false;
return struct_->is_window_rendering_disabled(struct_)?true:false;
}
bool CefBrowserCToCpp::GetSize(PaintElementType type, int& width, int& height)
{
if (CEF_MEMBER_MISSING(struct_, get_size))
return false;
return struct_->get_size(struct_, type, &width, &height)?true:false;
}
void CefBrowserCToCpp::SetSize(PaintElementType type, int width, int height)
{
if (CEF_MEMBER_MISSING(struct_, set_size))
return;
struct_->set_size(struct_, type, width, height);
}
bool CefBrowserCToCpp::IsPopupVisible()
{
if (CEF_MEMBER_MISSING(struct_, is_popup_visible))
return false;
return struct_->is_popup_visible(struct_)?true:false;
}
void CefBrowserCToCpp::HidePopup()
{
if (CEF_MEMBER_MISSING(struct_, hide_popup))
return;
struct_->hide_popup(struct_);
}
void CefBrowserCToCpp::Invalidate(const CefRect& dirtyRect)
{
if (CEF_MEMBER_MISSING(struct_, invalidate))
return;
struct_->invalidate(struct_, &dirtyRect);
}
bool CefBrowserCToCpp::GetImage(PaintElementType type, int width, int height,
void* buffer)
{
if (CEF_MEMBER_MISSING(struct_, get_image))
return false;
return struct_->get_image(struct_, type, width, height, buffer)?true:false;
}
void CefBrowserCToCpp::SendKeyEvent(KeyType type, int key, int modifiers,
bool sysChar, bool imeChar)
{
struct_->send_key_event(struct_, type, key, modifiers, sysChar, imeChar);
}
void CefBrowserCToCpp::SendMouseClickEvent(int x, int y, MouseButtonType type,
bool mouseUp, int clickCount)
{
if (CEF_MEMBER_MISSING(struct_, send_mouse_click_event))
return;
struct_->send_mouse_click_event(struct_, x, y, type, mouseUp, clickCount);
}
void CefBrowserCToCpp::SendMouseMoveEvent(int x, int y, bool mouseLeave)
{
if (CEF_MEMBER_MISSING(struct_, send_mouse_move_event))
return;
struct_->send_mouse_move_event(struct_, x, y, mouseLeave);
}
void CefBrowserCToCpp::SendMouseWheelEvent(int x, int y, int delta)
{
if (CEF_MEMBER_MISSING(struct_, send_mouse_wheel_event))
return;
struct_->send_mouse_wheel_event(struct_, x, y, delta);
}
void CefBrowserCToCpp::SendFocusEvent(bool setFocus)
{
if (CEF_MEMBER_MISSING(struct_, send_focus_event))
return;
struct_->send_focus_event(struct_, setFocus);
}
void CefBrowserCToCpp::SendCaptureLostEvent()
{
if (CEF_MEMBER_MISSING(struct_, send_capture_lost_event))
return;
struct_->send_capture_lost_event(struct_);
}
#ifdef _DEBUG
template<> long CefCToCpp<CefBrowserCToCpp, CefBrowser,