Chromium Code Reviews| 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()); |
| } |
| } |