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 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
974 void WebMediaPlayerAndroid::OnMediaPlayerPlay() { | 974 void WebMediaPlayerAndroid::OnMediaPlayerPlay() { |
975 UpdatePlayingState(true); | 975 UpdatePlayingState(true); |
976 client_->playbackStateChanged(); | 976 client_->playbackStateChanged(); |
977 } | 977 } |
978 | 978 |
979 void WebMediaPlayerAndroid::OnMediaPlayerPause() { | 979 void WebMediaPlayerAndroid::OnMediaPlayerPause() { |
980 UpdatePlayingState(false); | 980 UpdatePlayingState(false); |
981 client_->playbackStateChanged(); | 981 client_->playbackStateChanged(); |
982 } | 982 } |
983 | 983 |
984 void WebMediaPlayerAndroid::OnRequestFullscreen() { | |
985 client_->requestFullscreen(); | |
986 } | |
987 | |
988 void WebMediaPlayerAndroid::OnRemoteRouteAvailabilityChanged( | 984 void WebMediaPlayerAndroid::OnRemoteRouteAvailabilityChanged( |
989 bool routes_available) { | 985 bool routes_available) { |
990 client_->remoteRouteAvailabilityChanged(routes_available); | 986 client_->remoteRouteAvailabilityChanged(routes_available); |
991 } | 987 } |
992 | 988 |
993 void WebMediaPlayerAndroid::OnDurationChanged(const base::TimeDelta& duration) { | 989 void WebMediaPlayerAndroid::OnDurationChanged(const base::TimeDelta& duration) { |
994 DCHECK(main_thread_checker_.CalledOnValidThread()); | 990 DCHECK(main_thread_checker_.CalledOnValidThread()); |
995 // Only MSE |player_type_| registers this callback. | 991 // Only MSE |player_type_| registers this callback. |
996 DCHECK_EQ(player_type_, MEDIA_PLAYER_TYPE_MEDIA_SOURCE); | 992 DCHECK_EQ(player_type_, MEDIA_PLAYER_TYPE_MEDIA_SOURCE); |
997 | 993 |
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1865 | 1861 |
1866 bool WebMediaPlayerAndroid::IsHLSStream() const { | 1862 bool WebMediaPlayerAndroid::IsHLSStream() const { |
1867 std::string mime; | 1863 std::string mime; |
1868 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; | 1864 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; |
1869 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) | 1865 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) |
1870 return false; | 1866 return false; |
1871 return !mime.compare("application/x-mpegurl"); | 1867 return !mime.compare("application/x-mpegurl"); |
1872 } | 1868 } |
1873 | 1869 |
1874 } // namespace content | 1870 } // namespace content |
OLD | NEW |