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

Unified Diff: chrome/browser/extensions/api/automation_internal/automation_event_router.cc

Issue 1231603009: Re-land: Reimplement automation API on top of C++-backed AXTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nested event sending in AutomationManagerAura Created 5 years, 5 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/extensions/api/automation_internal/automation_event_router.cc
diff --git a/chrome/browser/extensions/api/automation_internal/automation_event_router.cc b/chrome/browser/extensions/api/automation_internal/automation_event_router.cc
index c62a3fa49cd733c8f440aa18ad3dc0adf8600a90..89ae0c77f342727d60ca0450f36003776785dc6d 100644
--- a/chrome/browser/extensions/api/automation_internal/automation_event_router.cc
+++ b/chrome/browser/extensions/api/automation_internal/automation_event_router.cc
@@ -62,7 +62,8 @@ void AutomationEventRouter::DispatchAccessibilityEvent(
content::RenderProcessHost* rph =
content::RenderProcessHost::FromID(listener.process_id);
- rph->Send(new ExtensionMsg_AccessibilityEvent(listener.routing_id, params));
+ rph->Send(new ExtensionMsg_AccessibilityEvent(listener.routing_id,
+ params));
}
}
@@ -93,7 +94,8 @@ void AutomationEventRouter::Register(
auto iter = std::find_if(
listeners_.begin(),
listeners_.end(),
- [listener_process_id, listener_routing_id](AutomationListener& item) {
+ [listener_process_id, listener_routing_id](
+ const AutomationListener& item) {
return (item.process_id == listener_process_id &&
item.routing_id == listener_routing_id);
});
@@ -132,8 +134,8 @@ void AutomationEventRouter::Observe(
std::remove_if(
listeners_.begin(),
listeners_.end(),
- [process_id](AutomationListener& item) {
- return item.process_id = process_id;
+ [process_id](const AutomationListener& item) {
+ return item.process_id == process_id;
});
}

Powered by Google App Engine
This is Rietveld 408576698