Index: chrome/browser/chromeos/extensions/media_player_event_router.cc |
diff --git a/chrome/browser/chromeos/extensions/media_player_event_router.cc b/chrome/browser/chromeos/extensions/media_player_event_router.cc |
index 9d3fbc6bc5caa0d6638843f493e3c2d6e7f4bfaf..c8aa4e87652aec88cbb01553309be4266062ce1e 100644 |
--- a/chrome/browser/chromeos/extensions/media_player_event_router.cc |
+++ b/chrome/browser/chromeos/extensions/media_player_event_router.cc |
@@ -21,10 +21,34 @@ void ExtensionMediaPlayerEventRouter::Init(Profile* profile) { |
profile_ = profile; |
} |
+void ExtensionMediaPlayerEventRouter::NotifyNextTrack() { |
+ if (profile_ && profile_->GetExtensionEventRouter()) { |
+ scoped_ptr<ListValue> args(new ListValue()); |
+ profile_->GetExtensionEventRouter()->DispatchEventToRenderers( |
+ "mediaPlayerPrivate.onNextTrack", args.Pass(), NULL, GURL()); |
asargent_no_longer_on_chrome
2012/08/21 22:20:26
Can you just put "new ListValue()" instead of havi
sschmitz
2012/08/22 00:11:55
The short answer is no. (see my email reply)
|
+ } |
+} |
+ |
void ExtensionMediaPlayerEventRouter::NotifyPlaylistChanged() { |
if (profile_ && profile_->GetExtensionEventRouter()) { |
scoped_ptr<ListValue> args(new ListValue()); |
profile_->GetExtensionEventRouter()->DispatchEventToRenderers( |
- "mediaPlayerPrivate.onPlaylistChanged", args.Pass(), NULL, GURL()); |
+ "mediaPlayerPrivate.onPlaylistChanged", args.Pass(), NULL, GURL()); |
+ } |
+} |
+ |
+void ExtensionMediaPlayerEventRouter::NotifyPrevTrack() { |
+ if (profile_ && profile_->GetExtensionEventRouter()) { |
+ scoped_ptr<ListValue> args(new ListValue()); |
+ profile_->GetExtensionEventRouter()->DispatchEventToRenderers( |
+ "mediaPlayerPrivate.onPrevTrack", args.Pass(), NULL, GURL()); |
+ } |
+} |
+ |
+void ExtensionMediaPlayerEventRouter::NotifyTogglePlayState() { |
+ if (profile_ && profile_->GetExtensionEventRouter()) { |
+ scoped_ptr<ListValue> args(new ListValue()); |
+ profile_->GetExtensionEventRouter()->DispatchEventToRenderers( |
+ "mediaPlayerPrivate.onTogglePlayState", args.Pass(), NULL, GURL()); |
} |
} |