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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 116293005: Refactor content/ to use ui::AXNodeData instead of blink. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update content/DEPS instead of subdirs Created 6 years, 11 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
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/common/accessibility_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index c04e4f57f06d44b39026f30bf7cd0b9746afb153..d6ff9459d36293598333866dc7608f836f0f3803 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -72,6 +72,7 @@
#include "net/base/network_change_notifier.h"
#include "net/url_request/url_request_context_getter.h"
#include "third_party/skia/include/core/SkBitmap.h"
+#include "ui/accessibility/ax_tree.h"
#include "ui/base/touch/touch_device.h"
#include "ui/base/touch/touch_enabled.h"
#include "ui/base/ui_base_switches.h"
@@ -2014,7 +2015,7 @@ void RenderViewHostImpl::DisownOpener() {
}
void RenderViewHostImpl::SetAccessibilityCallbackForTesting(
- const base::Callback<void(blink::WebAXEvent)>& callback) {
+ const base::Callback<void(ui::AXEvent)>& callback) {
accessibility_testing_callback_ = callback;
}
@@ -2131,12 +2132,15 @@ void RenderViewHostImpl::OnAccessibilityEvents(
for (unsigned i = 0; i < params.size(); i++) {
const AccessibilityHostMsg_EventParams& param = params[i];
- blink::WebAXEvent src_type = param.event_type;
- if (src_type == blink::WebAXEventLayoutComplete ||
- src_type == blink::WebAXEventLoadComplete) {
- MakeAccessibilityNodeDataTree(param.nodes, &accessibility_tree_);
- }
- accessibility_testing_callback_.Run(src_type);
+ if (static_cast<int>(param.event_type) < 0)
+ continue;
+ ui::AXTreeUpdate update;
+ update.nodes = param.nodes;
+ if (!ax_tree_)
+ ax_tree_.reset(new ui::AXTree(update));
+ else
+ CHECK(ax_tree_->Unserialize(update)) << ax_tree_->error();
+ accessibility_testing_callback_.Run(param.event_type);
}
}
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/common/accessibility_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698