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

Side by Side Diff: chrome/browser/extensions/api/automation_internal/automation_event_router.cc

Issue 1201063002: Set up the infrastructure for Extension event metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaaaaase Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/api/automation_internal/automation_event_rou ter.h" 5 #include "chrome/browser/extensions/api/automation_internal/automation_event_rou ter.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 } 67 }
68 68
69 void AutomationEventRouter::DispatchTreeDestroyedEvent( 69 void AutomationEventRouter::DispatchTreeDestroyedEvent(
70 int tree_id, 70 int tree_id,
71 content::BrowserContext* browser_context) { 71 content::BrowserContext* browser_context) {
72 std::string event_name( 72 std::string event_name(
73 api::automation_internal::OnAccessibilityTreeDestroyed::kEventName); 73 api::automation_internal::OnAccessibilityTreeDestroyed::kEventName);
74 scoped_ptr<base::ListValue> args( 74 scoped_ptr<base::ListValue> args(
75 api::automation_internal::OnAccessibilityTreeDestroyed::Create(tree_id)); 75 api::automation_internal::OnAccessibilityTreeDestroyed::Create(tree_id));
76 scoped_ptr<Event> event(new Event(event_name, args.Pass())); 76 scoped_ptr<Event> event(new Event(events::UNKNOWN, event_name, args.Pass()));
77 event->restrict_to_browser_context = browser_context; 77 event->restrict_to_browser_context = browser_context;
78 EventRouter::Get(browser_context)->BroadcastEvent(event.Pass()); 78 EventRouter::Get(browser_context)->BroadcastEvent(event.Pass());
79 } 79 }
80 80
81 AutomationEventRouter::AutomationListener::AutomationListener() { 81 AutomationEventRouter::AutomationListener::AutomationListener() {
82 } 82 }
83 83
84 AutomationEventRouter::AutomationListener::~AutomationListener() { 84 AutomationEventRouter::AutomationListener::~AutomationListener() {
85 } 85 }
86 86
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 int process_id = rph->GetID(); 130 int process_id = rph->GetID();
131 std::remove_if( 131 std::remove_if(
132 listeners_.begin(), 132 listeners_.begin(),
133 listeners_.end(), 133 listeners_.end(),
134 [process_id](AutomationListener& item) { 134 [process_id](AutomationListener& item) {
135 return item.process_id = process_id; 135 return item.process_id = process_id;
136 }); 136 });
137 } 137 }
138 138
139 } // namespace extensions 139 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698