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

Unified Diff: webkit/compositor_bindings/web_to_ccvideo_frame_provider.h

Issue 11754003: Move VideoFrameProvider to, and remove all usage of WebVideoFrame from cc/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed crashes Created 7 years, 12 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.h
diff --git a/webkit/compositor_bindings/web_to_ccvideo_frame_provider.h b/webkit/compositor_bindings/web_to_ccvideo_frame_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..bb9b0a74b542dc1e2a39c35777e077dbdd7ea616
--- /dev/null
+++ b/webkit/compositor_bindings/web_to_ccvideo_frame_provider.h
@@ -0,0 +1,36 @@
+// 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.
+
+#ifndef WEBKIT_COMPOSITOR_BINDINGS_WEB_TO_CCVIDEO_FRAME_PROVIDER_H_
+#define WEBKIT_COMPOSITOR_BINDINGS_WEB_TO_CCVIDEO_FRAME_PROVIDER_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "cc/video_frame_provider.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebVideoFrameProvider.h"
sheu 2013/01/03 22:00:27 Forward-declaration instead of header?
danakj 2013/01/03 22:44:54 Done.
+
+namespace webkit {
+
+class WebToCCVideoFrameProvider : public cc::VideoFrameProvider {
+ public:
+ static scoped_ptr<WebToCCVideoFrameProvider> Create(
+ WebKit::WebVideoFrameProvider* web_provider);
+ virtual ~WebToCCVideoFrameProvider();
+
+ // cc::VideoFrameProvider implementation.
+ virtual void SetVideoFrameProviderClient(Client*) OVERRIDE;
+ virtual scoped_refptr<media::VideoFrame> GetCurrentFrame() OVERRIDE;
+ virtual void PutCurrentFrame(scoped_refptr<media::VideoFrame> frame) OVERRIDE;
+
+ private:
+ explicit WebToCCVideoFrameProvider(WebKit::WebVideoFrameProvider*);
+
+ class ClientAdapter;
+ scoped_ptr<ClientAdapter> client_adapter_;
+ WebKit::WebVideoFrameProvider* web_provider_;
+ WebKit::WebVideoFrame* web_frame_;
+};
+
+} // namespace webkit
+
+#endif // WEBKIT_COMPOSITOR_BINDINGS_WEB_TO_CCVIDEO_FRAME_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698