- 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

@ -36,6 +36,11 @@ BOOL InitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);
#ifdef _WIN32
// Add Common Controls to the application manifest because it's required to
// support the default tooltip implementation.
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
// Program entry point function.
int APIENTRY wWinMain(HINSTANCE hInstance,
@ -518,6 +523,17 @@ public:
return RV_CONTINUE;
}
// Event called when the browser is about to display a tooltip. |text|
// contains the text that will be displayed in the tooltip. To handle
// the display of the tooltip yourself return RV_HANDLED. Otherwise,
// you can optionally modify |text| and then return RV_CONTINUE to allow
// the browser to display the tooltip.
virtual RetVal HandleTooltip(CefRefPtr<CefBrowser> browser,
std::wstring& text)
{
return RV_CONTINUE;
}
// Called when the browser component receives a keyboard event.
// |type| is the type of keyboard event (see |KeyEventType|).
// |code| is the windows scan-code for the event.