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

Unified Diff: chrome/renderer/render_view.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/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 16095)
+++ chrome/renderer/render_view.cc (working copy)
@@ -91,7 +91,6 @@
using base::Time;
using base::TimeDelta;
-using webkit_glue::WebAccessibility;
using WebKit::WebConsoleMessage;
using WebKit::WebDragData;
using WebKit::WebRect;
@@ -2042,7 +2041,6 @@
void RenderView::OnDownloadImage(int id,
const GURL& image_url,
int image_size) {
-
bool data_image_failed = false;
if (image_url.SchemeIs("data")) {
SkBitmap data_image = ImageFromDataUrl(image_url);
@@ -2748,8 +2746,10 @@
// If accessibility is not activated, ignore clearing message.
return;
}
+
if (!web_accessibility_manager_->ClearAccObjMap(acc_obj_id, clear_all))
return;
+
#else // defined(OS_WIN)
// TODO(port): accessibility not yet implemented
NOTIMPLEMENTED();
@@ -3007,3 +3007,25 @@
"Renderer.All.StartToFirstLayout", start_to_first_layout);
}
}
+
+void RenderView::FocusAccessibilityObject(
+ WebCore::AccessibilityObject* acc_obj) {
+#if defined(OS_WIN)
+ if (!web_accessibility_manager_.get()) {
+ web_accessibility_manager_.reset(
+ webkit_glue::WebAccessibilityManager::Create());
+ }
+
+ // Retrieve the accessibility object id of the AccessibilityObject.
+ int acc_obj_id = web_accessibility_manager_->FocusAccObj(acc_obj);
+
+ // If id is valid, alert the browser side that an accessibility focus change
+ // occurred.
+ if (acc_obj_id >= 0)
+ Send(new ViewHostMsg_AccessibilityFocusChange(routing_id_, acc_obj_id));
+
+#else // defined(OS_WIN)
+ // TODO(port): accessibility not yet implemented
+ NOTIMPLEMENTED();
+#endif
+}

Powered by Google App Engine
This is Rietveld 408576698