| 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 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 968 break; | 968 break; |
| 969 } | 969 } |
| 970 | 970 |
| 971 // Repaint to trigger UI update. | 971 // Repaint to trigger UI update. |
| 972 Repaint(); | 972 Repaint(); |
| 973 } | 973 } |
| 974 | 974 |
| 975 void WebMediaPlayerImpl::OnDemuxerOpened( | 975 void WebMediaPlayerImpl::OnDemuxerOpened( |
| 976 scoped_ptr<WebKit::WebMediaSource> media_source) { | 976 scoped_ptr<WebKit::WebMediaSource> media_source) { |
| 977 DCHECK(main_loop_->BelongsToCurrentThread()); | 977 DCHECK(main_loop_->BelongsToCurrentThread()); |
| 978 media_source->open(new WebMediaSourceClientImpl(chunk_demuxer_)); | 978 media_source->open(new WebMediaSourceClientImpl( |
| 979 chunk_demuxer_, base::Bind(&LogMediaSourceError, media_log_))); |
| 979 } | 980 } |
| 980 | 981 |
| 981 void WebMediaPlayerImpl::OnKeyAdded(const std::string& key_system, | 982 void WebMediaPlayerImpl::OnKeyAdded(const std::string& key_system, |
| 982 const std::string& session_id) { | 983 const std::string& session_id) { |
| 983 DCHECK(main_loop_->BelongsToCurrentThread()); | 984 DCHECK(main_loop_->BelongsToCurrentThread()); |
| 984 | 985 |
| 985 base::Histogram::FactoryGet( | 986 base::Histogram::FactoryGet( |
| 986 kMediaEme + KeySystemNameForUMA(key_system) + ".KeyAdded", | 987 kMediaEme + KeySystemNameForUMA(key_system) + ".KeyAdded", |
| 987 1, 1000000, 50, | 988 1, 1000000, 50, |
| 988 base::Histogram::kUmaTargetedHistogramFlag)->Add(1); | 989 base::Histogram::kUmaTargetedHistogramFlag)->Add(1); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1199 | 1200 |
| 1200 if (pending_repaint_) | 1201 if (pending_repaint_) |
| 1201 return; | 1202 return; |
| 1202 | 1203 |
| 1203 pending_repaint_ = true; | 1204 pending_repaint_ = true; |
| 1204 main_loop_->PostTask(FROM_HERE, base::Bind( | 1205 main_loop_->PostTask(FROM_HERE, base::Bind( |
| 1205 &WebMediaPlayerImpl::Repaint, AsWeakPtr())); | 1206 &WebMediaPlayerImpl::Repaint, AsWeakPtr())); |
| 1206 } | 1207 } |
| 1207 | 1208 |
| 1208 } // namespace webkit_media | 1209 } // namespace webkit_media |
| OLD | NEW |