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

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: compile 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..04afc5ab123a3b638f7155de1b7f6b34b8990d54 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, make_scoped_ptr(new ListValue())));
+ 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