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

Unified Diff: content/renderer/pepper/pepper_video_source_host.h

Issue 13771020: Add Pepper VideoReader and VideoWriter plumbing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, clean up some headers. Created 7 years, 8 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: content/renderer/pepper/pepper_video_source_host.h
diff --git a/content/renderer/pepper/pepper_video_source_host.h b/content/renderer/pepper/pepper_video_source_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..c2a873f80e136498222f55164f4a64d91c6402aa
--- /dev/null
+++ b/content/renderer/pepper/pepper_video_source_host.h
@@ -0,0 +1,47 @@
+// Copyright (c) 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.
+
+#ifndef CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_SOURCE_HOST_H_
+#define CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_SOURCE_HOST_H_
+
+#include "base/compiler_specific.h"
+#include "base/memory/weak_ptr.h"
+#include "content/common/content_export.h"
+#include "ppapi/c/pp_time.h"
+#include "ppapi/host/resource_host.h"
+
+namespace content {
+
+class RendererPpapiHost;
+
+class CONTENT_EXPORT PepperVideoSourceHost : public ppapi::host::ResourceHost {
+ public:
+ PepperVideoSourceHost(RendererPpapiHost* host,
+ PP_Instance instance,
+ PP_Resource resource);
+
+ virtual ~PepperVideoSourceHost();
+
+ virtual int32_t OnResourceMessageReceived(
+ const IPC::Message& msg,
+ ppapi::host::HostMessageContext* context) OVERRIDE;
+
+ private:
+ int32_t OnHostMsgOpen(ppapi::host::HostMessageContext* context,
+ const std::string& stream_url);
+ int32_t OnHostMsgGetFrame(ppapi::host::HostMessageContext* context);
+ int32_t OnHostMsgClose(ppapi::host::HostMessageContext* context);
+
+ RendererPpapiHost* renderer_ppapi_host_;
+
+ base::WeakPtrFactory<PepperVideoSourceHost> weak_factory_;
+
+ PP_TimeTicks last_timestamp_;
+
+ DISALLOW_COPY_AND_ASSIGN(PepperVideoSourceHost);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_SOURCE_HOST_H_
« no previous file with comments | « content/renderer/pepper/pepper_video_destination_host.cc ('k') | content/renderer/pepper/pepper_video_source_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698