OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/chromeos/extensions/media_player_event_router.h" |
| 6 |
| 7 #include "base/memory/singleton.h" |
| 8 #include "chrome/browser/extensions/extension_event_router.h" |
| 9 #include "chrome/browser/profiles/profile.h" |
| 10 |
| 11 ExtensionMediaPlayerEventRouter::ExtensionMediaPlayerEventRouter() |
| 12 : profile_(NULL) { |
| 13 } |
| 14 |
| 15 ExtensionMediaPlayerEventRouter* |
| 16 ExtensionMediaPlayerEventRouter::GetInstance() { |
| 17 return Singleton<ExtensionMediaPlayerEventRouter>::get(); |
| 18 } |
| 19 |
| 20 void ExtensionMediaPlayerEventRouter::Init(Profile* profile) { |
| 21 profile_ = profile; |
| 22 } |
| 23 |
| 24 void ExtensionMediaPlayerEventRouter::NotifyPlaylistChanged() { |
| 25 if (profile_ && profile_->GetExtensionEventRouter()) { |
| 26 profile_->GetExtensionEventRouter()->DispatchEventToRenderers( |
| 27 "mediaPlayerPrivate.onPlaylistChanged", "[]", NULL, GURL()); |
| 28 } |
| 29 } |
OLD | NEW |