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

Side by Side 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: ImageData management, depends on 14170012 Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_SOURCE_HOST_H_
6 #define CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_SOURCE_HOST_H_
7
8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h"
11 #include "content/common/content_export.h"
12 #include "ppapi/c/pp_size.h"
13 #include "ppapi/c/ppb_image_data.h"
14 #include "ppapi/host/resource_host.h"
15
16 namespace content {
17
18 class RendererPpapiHost;
19
20 class CONTENT_EXPORT PepperVideoSourceHost : public ppapi::host::ResourceHost {
21 public:
22 PepperVideoSourceHost(RendererPpapiHost* host,
23 PP_Instance instance,
24 PP_Resource resource);
25
26 virtual ~PepperVideoSourceHost();
27
28 virtual int32_t OnResourceMessageReceived(
29 const IPC::Message& msg,
30 ppapi::host::HostMessageContext* context) OVERRIDE;
31
32 private:
33 int32_t OnHostMsgOpen(ppapi::host::HostMessageContext* context,
34 const std::string& stream_id);
35 int32_t OnHostMsgGetFrame(ppapi::host::HostMessageContext* context);
36 int32_t OnHostMsgClose(ppapi::host::HostMessageContext* context);
37
38 RendererPpapiHost* renderer_ppapi_host_;
39
40 base::WeakPtrFactory<PepperVideoSourceHost> weak_factory_;
41
42 double last_timestamp_;
43
44 DISALLOW_COPY_AND_ASSIGN(PepperVideoSourceHost);
45 };
46
47 } // namespace content
48
49 #endif // CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_SOURCE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698