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

Unified Diff: content/renderer/media/texttrack_impl.cc

Issue 495353003: Move WebMediaPlayerImpl and its dependencies to media/blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 months 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 | « content/renderer/media/texttrack_impl.h ('k') | content/renderer/media/video_frame_compositor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/texttrack_impl.cc
diff --git a/content/renderer/media/texttrack_impl.cc b/content/renderer/media/texttrack_impl.cc
deleted file mode 100644
index 565689ff040fe5746c685775aff67a68f1beaf13..0000000000000000000000000000000000000000
--- a/content/renderer/media/texttrack_impl.cc
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/renderer/media/texttrack_impl.h"
-
-#include "base/bind.h"
-#include "base/location.h"
-#include "base/single_thread_task_runner.h"
-#include "content/renderer/media/webinbandtexttrack_impl.h"
-#include "media/base/bind_to_current_loop.h"
-#include "third_party/WebKit/public/platform/WebInbandTextTrackClient.h"
-#include "third_party/WebKit/public/platform/WebMediaPlayerClient.h"
-
-namespace content {
-
-TextTrackImpl::TextTrackImpl(
- const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
- blink::WebMediaPlayerClient* client,
- scoped_ptr<WebInbandTextTrackImpl> text_track)
- : task_runner_(task_runner),
- client_(client),
- text_track_(text_track.Pass()) {
- client_->addTextTrack(text_track_.get());
-}
-
-TextTrackImpl::~TextTrackImpl() {
- task_runner_->PostTask(
- FROM_HERE,
- base::Bind(&TextTrackImpl::OnRemoveTrack,
- client_,
- base::Passed(&text_track_)));
-}
-
-void TextTrackImpl::addWebVTTCue(const base::TimeDelta& start,
- const base::TimeDelta& end,
- const std::string& id,
- const std::string& content,
- const std::string& settings) {
- task_runner_->PostTask(
- FROM_HERE,
- base::Bind(&TextTrackImpl::OnAddCue,
- text_track_.get(),
- start, end,
- id, content, settings));
-}
-
-void TextTrackImpl::OnAddCue(WebInbandTextTrackImpl* text_track,
- const base::TimeDelta& start,
- const base::TimeDelta& end,
- const std::string& id,
- const std::string& content,
- const std::string& settings) {
- if (blink::WebInbandTextTrackClient* client = text_track->client()) {
- client->addWebVTTCue(start.InSecondsF(),
- end.InSecondsF(),
- blink::WebString::fromUTF8(id),
- blink::WebString::fromUTF8(content),
- blink::WebString::fromUTF8(settings));
- }
-}
-
-void TextTrackImpl::OnRemoveTrack(
- blink::WebMediaPlayerClient* client,
- scoped_ptr<WebInbandTextTrackImpl> text_track) {
- if (text_track->client())
- client->removeTextTrack(text_track.get());
-}
-
-} // namespace content
« no previous file with comments | « content/renderer/media/texttrack_impl.h ('k') | content/renderer/media/video_frame_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698