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

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

Issue 1236493004: Final batch adding real histogram values for extension events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments, rebase, dcheck, etc 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_util.cc
diff --git a/chrome/browser/extensions/api/automation_internal/automation_util.cc b/chrome/browser/extensions/api/automation_internal/automation_util.cc
index b5168d607dd0ebac5de1dbcdc3f0f3dbf74c057e..538845f604f205bf0edbde2c5575dd397b1de34a 100644
--- a/chrome/browser/extensions/api/automation_internal/automation_util.cc
+++ b/chrome/browser/extensions/api/automation_internal/automation_util.cc
@@ -111,11 +111,12 @@ void PopulateNodeData(const ui::AXNodeData& node_data,
}
void DispatchEventInternal(content::BrowserContext* context,
+ events::HistogramValue histogram_value,
const std::string& event_name,
scoped_ptr<base::ListValue> args) {
if (context && EventRouter::Get(context)) {
scoped_ptr<Event> event(
- new Event(events::UNKNOWN, event_name, args.Pass()));
+ new Event(histogram_value, event_name, args.Pass()));
event->restrict_to_browser_context = context;
EventRouter::Get(context)->BroadcastEvent(event.Pass());
}
@@ -160,7 +161,7 @@ void DispatchAccessibilityEventsToAutomation(
// collection of tree updates over (to the extension); see
// |AccessibilityHostMsg_EventParams| and |AccessibilityHostMsg_Events|.
DispatchEventInternal(
- browser_context,
+ browser_context, events::AUTOMATION_INTERNAL_ON_ACCESSIBILITY_EVENT,
api::automation_internal::OnAccessibilityEvent::kEventName,
api::automation_internal::OnAccessibilityEvent::Create(
ax_event_params));
@@ -175,6 +176,7 @@ void DispatchTreeDestroyedEventToAutomation(
process_id, routing_id);
DispatchEventInternal(
browser_context,
+ events::AUTOMATION_INTERNAL_ON_ACCESSIBILITY_TREE_DESTROYED,
api::automation_internal::OnAccessibilityTreeDestroyed::kEventName,
api::automation_internal::OnAccessibilityTreeDestroyed::Create(tree_id));
AXTreeIDRegistry::GetInstance()->RemoveAXTreeID(tree_id);

Powered by Google App Engine
This is Rietveld 408576698