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

Unified Diff: webkit/compositor_bindings/web_to_ccvideo_frame_provider.cc

Issue 12902002: Remove WebVideoFrame, WebVideoFrameProvider, and WebVideoLayer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Just removing code Created 7 years, 9 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
Index: webkit/compositor_bindings/web_to_ccvideo_frame_provider.cc
diff --git a/webkit/compositor_bindings/web_to_ccvideo_frame_provider.cc b/webkit/compositor_bindings/web_to_ccvideo_frame_provider.cc
deleted file mode 100644
index e4113529a4372d3fd3535a6a23971f63725a79b8..0000000000000000000000000000000000000000
--- a/webkit/compositor_bindings/web_to_ccvideo_frame_provider.cc
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2012 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 "webkit/compositor_bindings/web_to_ccvideo_frame_provider.h"
-
-#include "base/logging.h"
-#include "media/base/video_frame.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebVideoFrameProvider.h"
-#include "webkit/media/webvideoframe_impl.h"
-
-using WebKit::WebVideoFrameProvider;
-using webkit_media::WebVideoFrameImpl;
-
-namespace webkit {
-
-scoped_ptr<WebToCCVideoFrameProvider> WebToCCVideoFrameProvider::Create(
- WebVideoFrameProvider* web_provider) {
- return make_scoped_ptr(new WebToCCVideoFrameProvider(web_provider));
-}
-
-WebToCCVideoFrameProvider::WebToCCVideoFrameProvider(
- WebVideoFrameProvider* web_provider)
- : web_provider_(web_provider), web_frame_(NULL) {}
-
-WebToCCVideoFrameProvider::~WebToCCVideoFrameProvider() {}
-
-class WebToCCVideoFrameProvider::ClientAdapter
- : public WebVideoFrameProvider::Client {
- public:
- explicit ClientAdapter(cc::VideoFrameProvider::Client* cc_client)
- : cc_client_(cc_client) {}
- virtual ~ClientAdapter() {}
-
- // WebVideoFrameProvider::Client implementation.
- virtual void stopUsingProvider() { cc_client_->StopUsingProvider(); }
-
- virtual void didReceiveFrame() { cc_client_->DidReceiveFrame(); }
-
- virtual void didUpdateMatrix(const float* matrix) {
- cc_client_->DidUpdateMatrix(matrix);
- }
-
- private:
- cc::VideoFrameProvider::Client* cc_client_;
-};
-
-void WebToCCVideoFrameProvider::SetVideoFrameProviderClient(Client* client) {
- scoped_ptr<ClientAdapter> client_adapter;
- if (client)
- client_adapter.reset(new ClientAdapter(client));
- web_provider_->setVideoFrameProviderClient(client_adapter.get());
- client_adapter_ = client_adapter.Pass();
-}
-
-scoped_refptr<media::VideoFrame> WebToCCVideoFrameProvider::GetCurrentFrame() {
- web_frame_ = web_provider_->getCurrentFrame();
- if (!web_frame_)
- return scoped_refptr<media::VideoFrame>();
- WebVideoFrameImpl* impl = static_cast<WebVideoFrameImpl*>(web_frame_);
- return impl->video_frame;
-}
-
-void WebToCCVideoFrameProvider::PutCurrentFrame(
- const scoped_refptr<media::VideoFrame>& frame) {
- if (!frame) {
- DCHECK(!web_frame_);
- web_provider_->putCurrentFrame(web_frame_);
- return;
- }
- DCHECK(web_frame_);
- WebVideoFrameImpl* impl = static_cast<WebVideoFrameImpl*>(web_frame_);
- DCHECK_EQ(impl->video_frame.get(), frame.get());
- web_provider_->putCurrentFrame(web_frame_);
- web_frame_ = NULL;
-}
-
-} // namespace webkit
« no previous file with comments | « webkit/compositor_bindings/web_to_ccvideo_frame_provider.h ('k') | webkit/compositor_bindings/web_video_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698