| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 // | 162 // |
| 163 // TODO(enal): remove when we get rid of per-audio-stream thread. | 163 // TODO(enal): remove when we get rid of per-audio-stream thread. |
| 164 main_loop_->PostTask( | 164 main_loop_->PostTask( |
| 165 FROM_HERE, | 165 FROM_HERE, |
| 166 base::Bind(&WebMediaPlayerImpl::IncrementExternallyAllocatedMemory, | 166 base::Bind(&WebMediaPlayerImpl::IncrementExternallyAllocatedMemory, |
| 167 AsWeakPtr())); | 167 AsWeakPtr())); |
| 168 | 168 |
| 169 // Also we want to be notified of |main_loop_| destruction. | 169 // Also we want to be notified of |main_loop_| destruction. |
| 170 base::MessageLoop::current()->AddDestructionObserver(this); | 170 base::MessageLoop::current()->AddDestructionObserver(this); |
| 171 | 171 |
| 172 if (WebKit::WebRuntimeFeatures::isEncryptedMediaEnabled()) { | 172 if (WebKit::WebRuntimeFeatures::isLegacyEncryptedMediaEnabled()) { |
| 173 decryptor_.reset(new ProxyDecryptor( | 173 decryptor_.reset(new ProxyDecryptor( |
| 174 client, | 174 client, |
| 175 frame, | 175 frame, |
| 176 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyAdded), | 176 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyAdded), |
| 177 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyError), | 177 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyError), |
| 178 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyMessage), | 178 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyMessage), |
| 179 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnNeedKey))); | 179 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnNeedKey))); |
| 180 } | 180 } |
| 181 | 181 |
| 182 // Use the null sink if no sink was provided. | 182 // Use the null sink if no sink was provided. |
| (...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1243 | 1243 |
| 1244 if (pending_repaint_) | 1244 if (pending_repaint_) |
| 1245 return; | 1245 return; |
| 1246 | 1246 |
| 1247 pending_repaint_ = true; | 1247 pending_repaint_ = true; |
| 1248 main_loop_->PostTask(FROM_HERE, base::Bind( | 1248 main_loop_->PostTask(FROM_HERE, base::Bind( |
| 1249 &WebMediaPlayerImpl::Repaint, AsWeakPtr())); | 1249 &WebMediaPlayerImpl::Repaint, AsWeakPtr())); |
| 1250 } | 1250 } |
| 1251 | 1251 |
| 1252 } // namespace webkit_media | 1252 } // namespace webkit_media |
| OLD | NEW |