Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1364)

Unified Diff: Source/web/WebMediaPlayerClientImpl.cpp

Issue 61603006: Remove MediaSourcePrivate/SourceBufferPrivate (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: assert null Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/SourceBufferPrivateImpl.cpp ('k') | Source/web/web.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebMediaPlayerClientImpl.cpp
diff --git a/Source/web/WebMediaPlayerClientImpl.cpp b/Source/web/WebMediaPlayerClientImpl.cpp
index 17c7fb28e513ee3f4dced06785ca5c3adb22bef6..d0ceac3eeddcf16c4351c4ca389f4fefd4928bb3 100644
--- a/Source/web/WebMediaPlayerClientImpl.cpp
+++ b/Source/web/WebMediaPlayerClientImpl.cpp
@@ -5,7 +5,6 @@
#include "config.h"
#include "WebMediaPlayerClientImpl.h"
-#include "MediaSourcePrivateImpl.h"
#include "WebDocument.h"
#include "WebFrameClient.h"
#include "WebFrameImpl.h"
@@ -205,7 +204,7 @@ void WebMediaPlayerClientImpl::removeTextTrack(WebInbandTextTrack* textTrack)
void WebMediaPlayerClientImpl::mediaSourceOpened(WebMediaSource* webMediaSource)
{
ASSERT(webMediaSource);
- m_mediaSource->setPrivateAndOpen(adoptPtr(new MediaSourcePrivateImpl(adoptPtr(webMediaSource))));
+ m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource));
}
void WebMediaPlayerClientImpl::requestFullscreen()
@@ -467,15 +466,8 @@ double WebMediaPlayerClientImpl::maxTimeSeekable() const
PassRefPtr<TimeRanges> WebMediaPlayerClientImpl::buffered() const
{
- if (m_webMediaPlayer) {
- const WebTimeRanges& webRanges = m_webMediaPlayer->buffered();
-
- // FIXME: Save the time ranges in a member variable and update it when needed.
- RefPtr<TimeRanges> ranges = TimeRanges::create();
- for (size_t i = 0; i < webRanges.size(); ++i)
- ranges->add(webRanges[i].start, webRanges[i].end);
- return ranges.release();
- }
+ if (m_webMediaPlayer)
+ return TimeRanges::create(m_webMediaPlayer->buffered());
return TimeRanges::create();
}
« no previous file with comments | « Source/web/SourceBufferPrivateImpl.cpp ('k') | Source/web/web.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698