| 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 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1071 WebString::fromUTF8(key_system), | 1071 WebString::fromUTF8(key_system), |
| 1072 WebString::fromUTF8(session_id), | 1072 WebString::fromUTF8(session_id), |
| 1073 static_cast<WebKit::WebMediaPlayerClient::MediaKeyErrorCode>(error_code), | 1073 static_cast<WebKit::WebMediaPlayerClient::MediaKeyErrorCode>(error_code), |
| 1074 system_code); | 1074 system_code); |
| 1075 } | 1075 } |
| 1076 | 1076 |
| 1077 void WebMediaPlayerImpl::OnKeyMessage(const std::string& key_system, | 1077 void WebMediaPlayerImpl::OnKeyMessage(const std::string& key_system, |
| 1078 const std::string& session_id, | 1078 const std::string& session_id, |
| 1079 scoped_array<uint8> message, | 1079 scoped_array<uint8> message, |
| 1080 int message_length, | 1080 int message_length, |
| 1081 const std::string& /* default_url */) { | 1081 const GURL& default_url) { |
| 1082 DCHECK_EQ(main_loop_, MessageLoop::current()); | 1082 DCHECK_EQ(main_loop_, MessageLoop::current()); |
| 1083 | 1083 |
| 1084 GetClient()->keyMessage(WebString::fromUTF8(key_system), | 1084 GetClient()->keyMessage(WebString::fromUTF8(key_system), |
| 1085 WebString::fromUTF8(session_id), | 1085 WebString::fromUTF8(session_id), |
| 1086 message.get(), | 1086 message.get(), |
| 1087 message_length); | 1087 message_length, |
| 1088 default_url); |
| 1088 } | 1089 } |
| 1089 | 1090 |
| 1090 void WebMediaPlayerImpl::SetOpaque(bool opaque) { | 1091 void WebMediaPlayerImpl::SetOpaque(bool opaque) { |
| 1091 DCHECK_EQ(main_loop_, MessageLoop::current()); | 1092 DCHECK_EQ(main_loop_, MessageLoop::current()); |
| 1092 | 1093 |
| 1093 GetClient()->setOpaque(opaque); | 1094 GetClient()->setOpaque(opaque); |
| 1094 } | 1095 } |
| 1095 | 1096 |
| 1096 void WebMediaPlayerImpl::DataSourceInitialized(const GURL& gurl, bool success) { | 1097 void WebMediaPlayerImpl::DataSourceInitialized(const GURL& gurl, bool success) { |
| 1097 DCHECK_EQ(main_loop_, MessageLoop::current()); | 1098 DCHECK_EQ(main_loop_, MessageLoop::current()); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1200 return audio_source_provider_; | 1201 return audio_source_provider_; |
| 1201 } | 1202 } |
| 1202 | 1203 |
| 1203 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { | 1204 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { |
| 1204 DCHECK_EQ(main_loop_, MessageLoop::current()); | 1205 DCHECK_EQ(main_loop_, MessageLoop::current()); |
| 1205 incremented_externally_allocated_memory_ = true; | 1206 incremented_externally_allocated_memory_ = true; |
| 1206 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); | 1207 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); |
| 1207 } | 1208 } |
| 1208 | 1209 |
| 1209 } // namespace webkit_media | 1210 } // namespace webkit_media |
| OLD | NEW |