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/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 void WebMediaPlayerAndroid::OnMediaPlayerPlay() { | 816 void WebMediaPlayerAndroid::OnMediaPlayerPlay() { |
817 UpdatePlayingState(true); | 817 UpdatePlayingState(true); |
818 client_->playbackStateChanged(); | 818 client_->playbackStateChanged(); |
819 } | 819 } |
820 | 820 |
821 void WebMediaPlayerAndroid::OnMediaPlayerPause() { | 821 void WebMediaPlayerAndroid::OnMediaPlayerPause() { |
822 UpdatePlayingState(false); | 822 UpdatePlayingState(false); |
823 client_->playbackStateChanged(); | 823 client_->playbackStateChanged(); |
824 } | 824 } |
825 | 825 |
| 826 void WebMediaPlayerAndroid::OnRequestFullscreen() { |
| 827 client_->requestFullscreen(); |
| 828 } |
| 829 |
826 void WebMediaPlayerAndroid::OnDurationChanged(const base::TimeDelta& duration) { | 830 void WebMediaPlayerAndroid::OnDurationChanged(const base::TimeDelta& duration) { |
827 DCHECK(main_loop_->BelongsToCurrentThread()); | 831 DCHECK(main_loop_->BelongsToCurrentThread()); |
828 // Only MSE |player_type_| registers this callback. | 832 // Only MSE |player_type_| registers this callback. |
829 DCHECK_EQ(player_type_, MEDIA_PLAYER_TYPE_MEDIA_SOURCE); | 833 DCHECK_EQ(player_type_, MEDIA_PLAYER_TYPE_MEDIA_SOURCE); |
830 | 834 |
831 // Cache the new duration value and trust it over any subsequent duration | 835 // Cache the new duration value and trust it over any subsequent duration |
832 // values received in OnMediaMetadataChanged(). | 836 // values received in OnMediaMetadataChanged(). |
833 // TODO(wolenetz): Correctly handle durations that MediaSourcePlayer | 837 // TODO(wolenetz): Correctly handle durations that MediaSourcePlayer |
834 // considers unseekable, including kInfiniteDuration(). | 838 // considers unseekable, including kInfiniteDuration(). |
835 // See http://crbug.com/248396 | 839 // See http://crbug.com/248396 |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1447 | 1451 |
1448 void WebMediaPlayerAndroid::exitFullscreen() { | 1452 void WebMediaPlayerAndroid::exitFullscreen() { |
1449 proxy_->ExitFullscreen(player_id_); | 1453 proxy_->ExitFullscreen(player_id_); |
1450 } | 1454 } |
1451 | 1455 |
1452 bool WebMediaPlayerAndroid::canEnterFullscreen() const { | 1456 bool WebMediaPlayerAndroid::canEnterFullscreen() const { |
1453 return manager_->CanEnterFullscreen(frame_); | 1457 return manager_->CanEnterFullscreen(frame_); |
1454 } | 1458 } |
1455 | 1459 |
1456 } // namespace content | 1460 } // namespace content |
OLD | NEW |