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

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: android compile 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/font_settings/font_settings_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cbd2f9b62a89a6262e869da879054f8fe3cd45c0..a16654b3469a6b87c96181fa2c080041cb217fac 100644
--- a/chrome/browser/extensions/api/automation_internal/automation_util.cc
+++ b/chrome/browser/extensions/api/automation_internal/automation_util.cc
@@ -116,11 +116,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());
}
@@ -188,7 +189,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));
@@ -203,6 +204,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);
« no previous file with comments | « no previous file | chrome/browser/extensions/api/font_settings/font_settings_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698