Commit 02fbaefa authored by serya@chromium.org's avatar serya@chromium.org

Fixing: Media file doesn't play after closing the media player using ctrl + w

BUG=chromium-os:19257
TEST=None


Review URL: http://codereview.chromium.org/7741021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98415 0039d316-1c4b-4281-b951-d872f2087c98
parent 0c974a99
......@@ -167,9 +167,9 @@ void MediaPlayer::SetPlaybackError(GURL const& url) {
void MediaPlayer::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_BROWSER_CLOSING);
DCHECK(type == chrome::NOTIFICATION_BROWSER_CLOSED);
registrar_.Remove(this,
chrome::NOTIFICATION_BROWSER_CLOSING,
chrome::NOTIFICATION_BROWSER_CLOSED,
source);
if (Source<Browser>(source).ptr() == mediaplayer_browser_) {
mediaplayer_browser_ = NULL;
......@@ -205,7 +205,7 @@ void MediaPlayer::PopupPlaylist(Browser* creator) {
gfx::Rect(),
profile);
registrar_.Add(this,
chrome::NOTIFICATION_BROWSER_CLOSING,
chrome::NOTIFICATION_BROWSER_CLOSED,
Source<Browser>(playlist_browser_));
playlist_browser_->AddSelectedTabWithURL(GetMediaplayerPlaylistUrl(),
PageTransition::LINK);
......@@ -230,7 +230,7 @@ void MediaPlayer::PopupMediaPlayer(Browser* creator) {
gfx::Rect(),
profile);
registrar_.Add(this,
chrome::NOTIFICATION_BROWSER_CLOSING,
chrome::NOTIFICATION_BROWSER_CLOSED,
Source<Browser>(mediaplayer_browser_));
#if defined(OS_CHROMEOS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment