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 "content/renderer/media/webmediaplayer_impl.h" | 5 #include "content/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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 #define BIND_TO_RENDER_LOOP(function) \ | 133 #define BIND_TO_RENDER_LOOP(function) \ |
134 (DCHECK(main_loop_->BelongsToCurrentThread()), \ | 134 (DCHECK(main_loop_->BelongsToCurrentThread()), \ |
135 media::BindToCurrentLoop(base::Bind(function, AsWeakPtr()))) | 135 media::BindToCurrentLoop(base::Bind(function, AsWeakPtr()))) |
136 | 136 |
137 static void LogMediaSourceError(const scoped_refptr<media::MediaLog>& media_log, | 137 static void LogMediaSourceError(const scoped_refptr<media::MediaLog>& media_log, |
138 const std::string& error) { | 138 const std::string& error) { |
139 media_log->AddEvent(media_log->CreateMediaSourceErrorEvent(error)); | 139 media_log->AddEvent(media_log->CreateMediaSourceErrorEvent(error)); |
140 } | 140 } |
141 | 141 |
142 WebMediaPlayerImpl::WebMediaPlayerImpl( | 142 WebMediaPlayerImpl::WebMediaPlayerImpl( |
143 blink::WebFrame* frame, | 143 blink::WebLocalFrame* frame, |
144 blink::WebMediaPlayerClient* client, | 144 blink::WebMediaPlayerClient* client, |
145 base::WeakPtr<WebMediaPlayerDelegate> delegate, | 145 base::WeakPtr<WebMediaPlayerDelegate> delegate, |
146 const WebMediaPlayerParams& params) | 146 const WebMediaPlayerParams& params) |
147 : frame_(frame), | 147 : frame_(frame), |
148 network_state_(WebMediaPlayer::NetworkStateEmpty), | 148 network_state_(WebMediaPlayer::NetworkStateEmpty), |
149 ready_state_(WebMediaPlayer::ReadyStateHaveNothing), | 149 ready_state_(WebMediaPlayer::ReadyStateHaveNothing), |
150 main_loop_(base::MessageLoopProxy::current()), | 150 main_loop_(base::MessageLoopProxy::current()), |
151 media_loop_( | 151 media_loop_( |
152 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy()), | 152 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy()), |
153 media_log_(new RenderMediaLog()), | 153 media_log_(new RenderMediaLog()), |
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1317 | 1317 |
1318 if (web_cdm_) { | 1318 if (web_cdm_) { |
1319 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); | 1319 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); |
1320 return; | 1320 return; |
1321 } | 1321 } |
1322 | 1322 |
1323 decryptor_ready_cb_ = decryptor_ready_cb; | 1323 decryptor_ready_cb_ = decryptor_ready_cb; |
1324 } | 1324 } |
1325 | 1325 |
1326 } // namespace content | 1326 } // namespace content |
OLD | NEW |