OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/renderer/media/android/webmediaplayer_android.h" | 5 #include "content/renderer/media/android/webmediaplayer_android.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/android/build_info.h" | 9 #include "base/android/build_info.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 return true; | 449 return true; |
450 | 450 |
451 if (mime.find("audio/") != std::string::npos || | 451 if (mime.find("audio/") != std::string::npos || |
452 mime.find("video/") != std::string::npos || | 452 mime.find("video/") != std::string::npos || |
453 mime.find("application/ogg") != std::string::npos) { | 453 mime.find("application/ogg") != std::string::npos) { |
454 return true; | 454 return true; |
455 } | 455 } |
456 return false; | 456 return false; |
457 } | 457 } |
458 | 458 |
| 459 bool WebMediaPlayerAndroid::isRemote() const { |
| 460 return is_remote_; |
| 461 } |
| 462 |
459 bool WebMediaPlayerAndroid::paused() const { | 463 bool WebMediaPlayerAndroid::paused() const { |
460 return !is_playing_; | 464 return !is_playing_; |
461 } | 465 } |
462 | 466 |
463 bool WebMediaPlayerAndroid::seeking() const { | 467 bool WebMediaPlayerAndroid::seeking() const { |
464 return seeking_; | 468 return seeking_; |
465 } | 469 } |
466 | 470 |
467 double WebMediaPlayerAndroid::duration() const { | 471 double WebMediaPlayerAndroid::duration() const { |
468 DCHECK(main_thread_checker_.CalledOnValidThread()); | 472 DCHECK(main_thread_checker_.CalledOnValidThread()); |
(...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1826 | 1830 |
1827 bool WebMediaPlayerAndroid::IsHLSStream() const { | 1831 bool WebMediaPlayerAndroid::IsHLSStream() const { |
1828 std::string mime; | 1832 std::string mime; |
1829 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; | 1833 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; |
1830 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) | 1834 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) |
1831 return false; | 1835 return false; |
1832 return !mime.compare("application/x-mpegurl"); | 1836 return !mime.compare("application/x-mpegurl"); |
1833 } | 1837 } |
1834 | 1838 |
1835 } // namespace content | 1839 } // namespace content |
OLD | NEW |