Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2422)

Unified Diff: chrome/browser/renderer_host/render_view_host.cc

Issue 115374: Adds propagation and handling of render-side focus events, for the benefit of... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/render_view_host.cc
===================================================================
--- chrome/browser/renderer_host/render_view_host.cc (revision 16095)
+++ chrome/browser/renderer_host/render_view_host.cc (working copy)
@@ -41,6 +41,11 @@
#include "webkit/api/public/WebFindOptions.h"
#include "webkit/glue/autofill_form.h"
+#if defined(OS_WIN)
+// TODO(port): accessibility not yet implemented. See http://crbug.com/8288.
+#include "chrome/browser/browser_accessibility_manager.h"
+#endif
+
using base::TimeDelta;
using WebKit::WebConsoleMessage;
using WebKit::WebFindOptions;
@@ -797,6 +802,8 @@
OnMsgPasteFromSelectionClipboard)
IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionPostMessage,
OnExtensionPostMessage)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_AccessibilityFocusChange,
+ OnAccessibilityFocusChange)
// Have the super handle all other messages.
IPC_MESSAGE_UNHANDLED(RenderWidgetHost::OnMessageReceived(msg))
IPC_END_MESSAGE_MAP_EX()
@@ -1409,3 +1416,12 @@
ExtensionMessageService::GetInstance(context)->
PostMessageFromRenderer(port_id, message);
}
+
+void RenderViewHost::OnAccessibilityFocusChange(int acc_obj_id) {
+#if defined(OS_WIN)
+ BrowserAccessibilityManager::GetInstance()->
+ ChangeAccessibilityFocus(acc_obj_id, process()->pid(), routing_id());
+#else
+ // TODO(port): accessibility not yet implemented. See http://crbug.com/8288.
+#endif
+}

Powered by Google App Engine
This is Rietveld 408576698