OLD | NEW |
(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/weak_ptr.h" |
| 10 #include "content/common/content_export.h" |
| 11 #include "ppapi/c/pp_time.h" |
| 12 #include "ppapi/host/resource_host.h" |
| 13 |
| 14 namespace content { |
| 15 |
| 16 class RendererPpapiHost; |
| 17 |
| 18 class CONTENT_EXPORT PepperVideoSourceHost : public ppapi::host::ResourceHost { |
| 19 public: |
| 20 PepperVideoSourceHost(RendererPpapiHost* host, |
| 21 PP_Instance instance, |
| 22 PP_Resource resource); |
| 23 |
| 24 virtual ~PepperVideoSourceHost(); |
| 25 |
| 26 virtual int32_t OnResourceMessageReceived( |
| 27 const IPC::Message& msg, |
| 28 ppapi::host::HostMessageContext* context) OVERRIDE; |
| 29 |
| 30 private: |
| 31 int32_t OnHostMsgOpen(ppapi::host::HostMessageContext* context, |
| 32 const std::string& stream_url); |
| 33 int32_t OnHostMsgGetFrame(ppapi::host::HostMessageContext* context); |
| 34 int32_t OnHostMsgClose(ppapi::host::HostMessageContext* context); |
| 35 |
| 36 RendererPpapiHost* renderer_ppapi_host_; |
| 37 |
| 38 base::WeakPtrFactory<PepperVideoSourceHost> weak_factory_; |
| 39 |
| 40 PP_TimeTicks last_timestamp_; |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(PepperVideoSourceHost); |
| 43 }; |
| 44 |
| 45 } // namespace content |
| 46 |
| 47 #endif // CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_SOURCE_HOST_H_ |
OLD | NEW |