OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/media/webmediaplayer_impl.h" | 5 #include "webkit/media/webmediaplayer_impl.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
879 | 879 |
880 case media::PIPELINE_ERROR_DECODE: | 880 case media::PIPELINE_ERROR_DECODE: |
881 case media::PIPELINE_ERROR_ABORT: | 881 case media::PIPELINE_ERROR_ABORT: |
882 case media::PIPELINE_ERROR_OUT_OF_MEMORY: | 882 case media::PIPELINE_ERROR_OUT_OF_MEMORY: |
883 case media::PIPELINE_ERROR_AUDIO_HARDWARE: | 883 case media::PIPELINE_ERROR_AUDIO_HARDWARE: |
884 case media::PIPELINE_ERROR_OPERATION_PENDING: | 884 case media::PIPELINE_ERROR_OPERATION_PENDING: |
885 case media::PIPELINE_ERROR_INVALID_STATE: | 885 case media::PIPELINE_ERROR_INVALID_STATE: |
886 // Decode error. | 886 // Decode error. |
887 SetNetworkState(WebMediaPlayer::NetworkStateDecodeError); | 887 SetNetworkState(WebMediaPlayer::NetworkStateDecodeError); |
888 break; | 888 break; |
889 | |
890 case media::PIPELINE_ERROR_DECRYPT: | |
891 // Decrypt error. | |
892 // TODO(xhwang): Change to use NetworkStateDecryptError once it's added in | |
893 // Webkit. See crbug.com/124486. | |
scherkus (not reviewing)
2012/04/21 03:04:22
ditto here
| |
894 SetNetworkState(WebMediaPlayer::NetworkStateDecodeError); | |
895 break; | |
889 } | 896 } |
890 | 897 |
891 // Repaint to trigger UI update. | 898 // Repaint to trigger UI update. |
892 Repaint(); | 899 Repaint(); |
893 } | 900 } |
894 | 901 |
895 void WebMediaPlayerImpl::OnNetworkEvent(NetworkEvent type) { | 902 void WebMediaPlayerImpl::OnNetworkEvent(NetworkEvent type) { |
896 DCHECK_EQ(main_loop_, MessageLoop::current()); | 903 DCHECK_EQ(main_loop_, MessageLoop::current()); |
897 switch(type) { | 904 switch(type) { |
898 case media::DOWNLOAD_CONTINUED: | 905 case media::DOWNLOAD_CONTINUED: |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1023 return audio_source_provider_; | 1030 return audio_source_provider_; |
1024 } | 1031 } |
1025 | 1032 |
1026 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { | 1033 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { |
1027 DCHECK_EQ(main_loop_, MessageLoop::current()); | 1034 DCHECK_EQ(main_loop_, MessageLoop::current()); |
1028 incremented_externally_allocated_memory_ = true; | 1035 incremented_externally_allocated_memory_ = true; |
1029 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); | 1036 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); |
1030 } | 1037 } |
1031 | 1038 |
1032 } // namespace webkit_media | 1039 } // namespace webkit_media |
OLD | NEW |