| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 // | 161 // |
| 162 // TODO(enal): remove when we get rid of per-audio-stream thread. | 162 // TODO(enal): remove when we get rid of per-audio-stream thread. |
| 163 main_loop_->PostTask( | 163 main_loop_->PostTask( |
| 164 FROM_HERE, | 164 FROM_HERE, |
| 165 base::Bind(&WebMediaPlayerImpl::IncrementExternallyAllocatedMemory, | 165 base::Bind(&WebMediaPlayerImpl::IncrementExternallyAllocatedMemory, |
| 166 AsWeakPtr())); | 166 AsWeakPtr())); |
| 167 | 167 |
| 168 // Also we want to be notified of |main_loop_| destruction. | 168 // Also we want to be notified of |main_loop_| destruction. |
| 169 base::MessageLoop::current()->AddDestructionObserver(this); | 169 base::MessageLoop::current()->AddDestructionObserver(this); |
| 170 | 170 |
| 171 if (WebKit::WebRuntimeFeatures::isEncryptedMediaEnabled()) { | 171 if (WebKit::WebRuntimeFeatures::isLegacyEncryptedMediaEnabled()) { |
| 172 decryptor_.reset(new ProxyDecryptor( | 172 decryptor_.reset(new ProxyDecryptor( |
| 173 client, | 173 client, |
| 174 frame, | 174 frame, |
| 175 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyAdded), | 175 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyAdded), |
| 176 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyError), | 176 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyError), |
| 177 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyMessage), | 177 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyMessage), |
| 178 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnNeedKey))); | 178 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnNeedKey))); |
| 179 } | 179 } |
| 180 | 180 |
| 181 // Use the null sink if no sink was provided. | 181 // Use the null sink if no sink was provided. |
| (...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1268 | 1268 |
| 1269 if (pending_repaint_) | 1269 if (pending_repaint_) |
| 1270 return; | 1270 return; |
| 1271 | 1271 |
| 1272 pending_repaint_ = true; | 1272 pending_repaint_ = true; |
| 1273 main_loop_->PostTask(FROM_HERE, base::Bind( | 1273 main_loop_->PostTask(FROM_HERE, base::Bind( |
| 1274 &WebMediaPlayerImpl::Repaint, AsWeakPtr())); | 1274 &WebMediaPlayerImpl::Repaint, AsWeakPtr())); |
| 1275 } | 1275 } |
| 1276 | 1276 |
| 1277 } // namespace webkit_media | 1277 } // namespace webkit_media |
| OLD | NEW |