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

Unified Diff: chrome/browser/extensions/api/rtc_private/rtc_private_api.cc

Issue 11440004: Remove deprecated extension EventRouter APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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/rtc_private/rtc_private_api.cc
diff --git a/chrome/browser/extensions/api/rtc_private/rtc_private_api.cc b/chrome/browser/extensions/api/rtc_private/rtc_private_api.cc
index ea9c31d1916db8f5ceb488333ad1d72f1c0c798b..622ec772b27d69e00ee1142b50acceafe367f6e7 100644
--- a/chrome/browser/extensions/api/rtc_private/rtc_private_api.cc
+++ b/chrome/browser/extensions/api/rtc_private/rtc_private_api.cc
@@ -91,12 +91,10 @@ void GetContactIntentData(const Contact& contact,
void RtcPrivateEventRouter::DispatchLaunchEvent(
Profile* profile, LaunchAction action, const Contact* contact) {
if (action == RtcPrivateEventRouter::LAUNCH_ACTIVATE) {
- extensions::ExtensionSystem::Get(profile)->event_router()->
- DispatchEventToRenderers(
- kOnLaunchEvent,
- scoped_ptr<ListValue>(new ListValue()),
- profile,
- GURL());
+ scoped_ptr<Event> event(new Event(
+ kOnLaunchEvent, scoped_ptr<ListValue>(new ListValue())));
Yoyo Zhou 2012/12/05 22:28:32 make_scoped_ptr works here.
Matt Perry 2012/12/05 22:53:53 Done.
+ event->restrict_to_profile = profile;
+ ExtensionSystem::Get(profile)->event_router()->BroadcastEvent(event.Pass());
} else {
DCHECK(contact);
extensions::api::rtc_private::LaunchData launch_data;
@@ -104,12 +102,10 @@ void RtcPrivateEventRouter::DispatchLaunchEvent(
GetContactIntentData(*contact,
&launch_data.intent.data.additional_properties);
launch_data.intent.type = kMimeTypeJson;
- extensions::ExtensionSystem::Get(profile)->event_router()->
- DispatchEventToRenderers(
- kOnLaunchEvent,
- extensions::api::rtc_private::OnLaunch::Create(launch_data),
- profile,
- GURL());
+ scoped_ptr<Event> event(new Event(
+ kOnLaunchEvent, api::rtc_private::OnLaunch::Create(launch_data)));
+ event->restrict_to_profile = profile;
+ ExtensionSystem::Get(profile)->event_router()->BroadcastEvent(event.Pass());
}
}

Powered by Google App Engine
This is Rietveld 408576698