| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/media/media_player.h" | 5 #include "chrome/browser/chromeos/media/media_player.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 int MediaPlayer::GetPlaylistPosition() const { | 68 int MediaPlayer::GetPlaylistPosition() const { |
| 69 return current_position_; | 69 return current_position_; |
| 70 } | 70 } |
| 71 | 71 |
| 72 //////////////////////////////////////////////////////////////////////////////// | 72 //////////////////////////////////////////////////////////////////////////////// |
| 73 // | 73 // |
| 74 // Mediaplayer | 74 // Mediaplayer |
| 75 // | 75 // |
| 76 //////////////////////////////////////////////////////////////////////////////// | 76 //////////////////////////////////////////////////////////////////////////////// |
| 77 | 77 |
| 78 // Allows InvokeLater without adding refcounting. This class is a Singleton and | |
| 79 // won't be deleted until it's last InvokeLater is run. | |
| 80 DISABLE_RUNNABLE_METHOD_REFCOUNT(MediaPlayer); | |
| 81 | |
| 82 MediaPlayer::~MediaPlayer() { | 78 MediaPlayer::~MediaPlayer() { |
| 83 } | 79 } |
| 84 | 80 |
| 85 // static | 81 // static |
| 86 MediaPlayer* MediaPlayer::GetInstance() { | 82 MediaPlayer* MediaPlayer::GetInstance() { |
| 87 return Singleton<MediaPlayer>::get(); | 83 return Singleton<MediaPlayer>::get(); |
| 88 } | 84 } |
| 89 | 85 |
| 90 void MediaPlayer::EnqueueMediaFile(Profile* profile, | 86 void MediaPlayer::EnqueueMediaFile(Profile* profile, |
| 91 const FilePath& file_path) { | 87 const FilePath& file_path) { |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 | 296 |
| 301 MediaPlayer::MediaPlayer() | 297 MediaPlayer::MediaPlayer() |
| 302 : current_position_(0), | 298 : current_position_(0), |
| 303 pending_playback_request_(false), | 299 pending_playback_request_(false), |
| 304 playlist_browser_(NULL), | 300 playlist_browser_(NULL), |
| 305 mediaplayer_browser_(NULL) { | 301 mediaplayer_browser_(NULL) { |
| 306 for (size_t i = 0; i < arraysize(supported_mime_type_list); ++i) { | 302 for (size_t i = 0; i < arraysize(supported_mime_type_list); ++i) { |
| 307 supported_mime_types_.insert(supported_mime_type_list[i]); | 303 supported_mime_types_.insert(supported_mime_type_list[i]); |
| 308 } | 304 } |
| 309 }; | 305 }; |
| OLD | NEW |