Merge revision 568 changes:

- Execute the CefFocusHandler::OnSetFocus callback for calls to CefBrowser::SetFocus and mouse clicks on the view (issue #563).

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/963@637 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2012-05-22 15:29:13 +00:00
parent c9be1aa8e4
commit d9b85ac1db

View File

@ -105,21 +105,8 @@ LRESULT CALLBACK CefBrowserImpl::WndProc(HWND hwnd, UINT message,
return 0;
case WM_SETFOCUS:
if (browser) {
WebViewHost* host = browser->UIT_GetWebViewHost();
if (host) {
bool handled = false;
CefRefPtr<CefClient> client = browser->GetClient();
if (client.get()) {
CefRefPtr<CefFocusHandler> handler = client->GetFocusHandler();
if (handler.get())
handled = handler->OnSetFocus(browser, FOCUS_SOURCE_SYSTEM);
}
if (!handled)
browser->UIT_SetFocus(host, true);
}
}
if (browser)
browser->SetFocus(true);
return 0;
case WM_ERASEBKGND: