| 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 "media/blink/webmediaplayer_impl.h" | 5 #include "media/blink/webmediaplayer_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 } | 807 } |
| 808 | 808 |
| 809 if (did_loading_progress) | 809 if (did_loading_progress) |
| 810 last_time_loading_progressed_ = tick_clock_->NowTicks(); | 810 last_time_loading_progressed_ = tick_clock_->NowTicks(); |
| 811 | 811 |
| 812 return did_loading_progress; | 812 return did_loading_progress; |
| 813 } | 813 } |
| 814 | 814 |
| 815 void WebMediaPlayerImpl::paint(blink::WebCanvas* canvas, | 815 void WebMediaPlayerImpl::paint(blink::WebCanvas* canvas, |
| 816 const blink::WebRect& rect, | 816 const blink::WebRect& rect, |
| 817 SkPaint& paint) { | 817 CdlPaint& paint) { |
| 818 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 818 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 819 TRACE_EVENT0("media", "WebMediaPlayerImpl:paint"); | 819 TRACE_EVENT0("media", "WebMediaPlayerImpl:paint"); |
| 820 | 820 |
| 821 // TODO(sandersd): Move this check into GetCurrentFrameFromCompositor() when | 821 // TODO(sandersd): Move this check into GetCurrentFrameFromCompositor() when |
| 822 // we have other ways to check if decoder owns video frame. | 822 // we have other ways to check if decoder owns video frame. |
| 823 // See http://crbug.com/595716 and http://crbug.com/602708 | 823 // See http://crbug.com/595716 and http://crbug.com/602708 |
| 824 if (cdm_) | 824 if (cdm_) |
| 825 return; | 825 return; |
| 826 | 826 |
| 827 scoped_refptr<VideoFrame> video_frame = GetCurrentFrameFromCompositor(); | 827 scoped_refptr<VideoFrame> video_frame = GetCurrentFrameFromCompositor(); |
| (...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1986 watch_time_reporter_->OnShown(); | 1986 watch_time_reporter_->OnShown(); |
| 1987 } | 1987 } |
| 1988 | 1988 |
| 1989 bool WebMediaPlayerImpl::IsHidden() const { | 1989 bool WebMediaPlayerImpl::IsHidden() const { |
| 1990 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 1990 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 1991 | 1991 |
| 1992 return delegate_ && delegate_->IsHidden(); | 1992 return delegate_ && delegate_->IsHidden(); |
| 1993 } | 1993 } |
| 1994 | 1994 |
| 1995 } // namespace media | 1995 } // namespace media |
| OLD | NEW |