OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_DESTINATION_HOST_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_DESTINATION_HOST_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_DESTINATION_HOST_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_DESTINATION_HOST_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | |
9 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "base/time.h" | |
yzshen1
2013/05/06 20:40:18
nit: please move it to .cc since the header doesn'
bbudge
2013/05/06 20:52:01
Done.
| |
10 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "content/renderer/media/video_destination_handler.h" | |
11 #include "ppapi/c/pp_time.h" | 14 #include "ppapi/c/pp_time.h" |
12 #include "ppapi/host/resource_host.h" | 15 #include "ppapi/host/resource_host.h" |
13 | 16 |
14 namespace content { | 17 namespace content { |
15 | 18 |
16 class RendererPpapiHost; | 19 class RendererPpapiHost; |
17 | 20 |
18 class CONTENT_EXPORT PepperVideoDestinationHost | 21 class CONTENT_EXPORT PepperVideoDestinationHost |
19 : public ppapi::host::ResourceHost { | 22 : public ppapi::host::ResourceHost { |
20 public: | 23 public: |
21 PepperVideoDestinationHost(RendererPpapiHost* host, | 24 PepperVideoDestinationHost(RendererPpapiHost* host, |
22 PP_Instance instance, | 25 PP_Instance instance, |
23 PP_Resource resource); | 26 PP_Resource resource); |
24 | 27 |
25 virtual ~PepperVideoDestinationHost(); | 28 virtual ~PepperVideoDestinationHost(); |
26 | 29 |
27 virtual int32_t OnResourceMessageReceived( | 30 virtual int32_t OnResourceMessageReceived( |
28 const IPC::Message& msg, | 31 const IPC::Message& msg, |
29 ppapi::host::HostMessageContext* context) OVERRIDE; | 32 ppapi::host::HostMessageContext* context) OVERRIDE; |
30 | 33 |
31 private: | 34 private: |
32 int32_t OnHostMsgOpen(ppapi::host::HostMessageContext* context, | 35 int32_t OnHostMsgOpen(ppapi::host::HostMessageContext* context, |
33 const std::string& stream_url); | 36 const std::string& stream_url); |
34 int32_t OnHostMsgPutFrame(ppapi::host::HostMessageContext* context, | 37 int32_t OnHostMsgPutFrame(ppapi::host::HostMessageContext* context, |
35 const ppapi::HostResource& image_data, | 38 const ppapi::HostResource& image_data_resource, |
36 PP_TimeTicks timestamp); | 39 PP_TimeTicks timestamp); |
37 int32_t OnHostMsgClose(ppapi::host::HostMessageContext* context); | 40 int32_t OnHostMsgClose(ppapi::host::HostMessageContext* context); |
38 | 41 |
39 RendererPpapiHost* renderer_ppapi_host_; | 42 RendererPpapiHost* renderer_ppapi_host_; |
40 | 43 |
41 base::WeakPtrFactory<PepperVideoDestinationHost> weak_factory_; | 44 base::WeakPtrFactory<PepperVideoDestinationHost> weak_factory_; |
42 | 45 |
46 scoped_ptr<content::FrameWriterInterface> frame_writer_; | |
47 | |
43 DISALLOW_COPY_AND_ASSIGN(PepperVideoDestinationHost); | 48 DISALLOW_COPY_AND_ASSIGN(PepperVideoDestinationHost); |
44 }; | 49 }; |
45 | 50 |
46 } // namespace content | 51 } // namespace content |
47 | 52 |
48 #endif // CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_DESTINATION_HOST_H_ | 53 #endif // CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_DESTINATION_HOST_H_ |
OLD | NEW |