Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: webkit/media/webmediaplayer_impl.cc

Issue 10165010: Add a media pipeline status error code for decryption error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Break out PIPELINE_ERROR_DECRYPT case Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698