- [mac] Add selector implementations for edit commands (issue #276).

- [mac] Don't generate character events for arrow key presses (issue #294).
- Call OnSetFocus when the browser view receives focus/becomes first responder (issue #314).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@281 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-08-27 18:41:21 +00:00
parent 723e5877e9
commit 16e468bb8c
4 changed files with 69 additions and 4 deletions

View File

@@ -81,8 +81,21 @@ LRESULT CALLBACK CefBrowserImpl::WndProc(HWND hwnd, UINT message,
return 0;
case WM_SETFOCUS:
if (browser)
browser->UIT_SetFocus(browser->UIT_GetWebViewHost(), true);
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, false);
}
if (!handled)
browser->UIT_SetFocus(host, true);
}
}
return 0;
case WM_ERASEBKGND: