| 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 "webkit/renderer/media/webmediaplayer_impl.h" | 5 #include "webkit/renderer/media/webmediaplayer_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 main_loop_->PostTask( | 165 main_loop_->PostTask( |
| 166 FROM_HERE, | 166 FROM_HERE, |
| 167 base::Bind(&WebMediaPlayerImpl::IncrementExternallyAllocatedMemory, | 167 base::Bind(&WebMediaPlayerImpl::IncrementExternallyAllocatedMemory, |
| 168 AsWeakPtr())); | 168 AsWeakPtr())); |
| 169 | 169 |
| 170 // Also we want to be notified of |main_loop_| destruction. | 170 // Also we want to be notified of |main_loop_| destruction. |
| 171 base::MessageLoop::current()->AddDestructionObserver(this); | 171 base::MessageLoop::current()->AddDestructionObserver(this); |
| 172 | 172 |
| 173 if (WebKit::WebRuntimeFeatures::isLegacyEncryptedMediaEnabled()) { | 173 if (WebKit::WebRuntimeFeatures::isLegacyEncryptedMediaEnabled()) { |
| 174 decryptor_.reset(new ProxyDecryptor( | 174 decryptor_.reset(new ProxyDecryptor( |
| 175 #if defined(ENABLE_PEPPER_CDMS) |
| 175 client, | 176 client, |
| 176 frame, | 177 frame, |
| 178 #endif |
| 177 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyAdded), | 179 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyAdded), |
| 178 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyError), | 180 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyError), |
| 179 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyMessage))); | 181 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyMessage))); |
| 180 } | 182 } |
| 181 | 183 |
| 182 // Use the null sink if no sink was provided. | 184 // Use the null sink if no sink was provided. |
| 183 audio_source_provider_ = new WebAudioSourceProviderImpl( | 185 audio_source_provider_ = new WebAudioSourceProviderImpl( |
| 184 params.audio_renderer_sink().get() | 186 params.audio_renderer_sink().get() |
| 185 ? params.audio_renderer_sink() | 187 ? params.audio_renderer_sink() |
| 186 : new media::NullAudioSink(media_loop_)); | 188 : new media::NullAudioSink(media_loop_)); |
| (...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1196 | 1198 |
| 1197 if (pending_repaint_) | 1199 if (pending_repaint_) |
| 1198 return; | 1200 return; |
| 1199 | 1201 |
| 1200 pending_repaint_ = true; | 1202 pending_repaint_ = true; |
| 1201 main_loop_->PostTask(FROM_HERE, base::Bind( | 1203 main_loop_->PostTask(FROM_HERE, base::Bind( |
| 1202 &WebMediaPlayerImpl::Repaint, AsWeakPtr())); | 1204 &WebMediaPlayerImpl::Repaint, AsWeakPtr())); |
| 1203 } | 1205 } |
| 1204 | 1206 |
| 1205 } // namespace webkit_media | 1207 } // namespace webkit_media |
| OLD | NEW |