- Add CefHandler::HandleTooltip and default tooltip implementation (issue #61).

- Add Common Controls to cefclient manifest because it's required for the default tooltip implementation.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@96 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2010-08-30 20:54:13 +00:00
parent a4776a9dda
commit c439ed160f
10 changed files with 178 additions and 2 deletions

View File

@ -457,6 +457,28 @@ enum cef_retval_t CEF_CALLBACK handler_handle_key_event(
modifiers, isSystemKey?true:false);
}
enum cef_retval_t CEF_CALLBACK handler_handle_tooltip(
struct _cef_handler_t* self, struct _cef_browser_t* browser,
cef_string_t* text)
{
DCHECK(self);
DCHECK(browser);
DCHECK(text);
if(!self || !browser || !text)
return RV_CONTINUE;
std::wstring textStr;
if(*text)
textStr = *text;
enum cef_retval_t rv = CefHandlerCppToC::Get(self)->HandleTooltip(
CefBrowserCToCpp::Wrap(browser), textStr);
transfer_string_contents(textStr, text);
return rv;
}
enum cef_retval_t CEF_CALLBACK handler_handle_console_message(
struct _cef_handler_t* self, cef_browser_t* browser, const wchar_t* message,
const wchar_t* source, int line)
@ -521,6 +543,7 @@ CefHandlerCppToC::CefHandlerCppToC(CefHandler* cls)
struct_.struct_.handle_take_focus = handler_handle_take_focus;
struct_.struct_.handle_set_focus = handler_handle_set_focus;
struct_.struct_.handle_key_event = handler_handle_key_event;
struct_.struct_.handle_tooltip = handler_handle_tooltip;
struct_.struct_.handle_console_message = handler_handle_console_message;
struct_.struct_.handle_find_result = handler_handle_find_result;
}