OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_FLASH_HOST_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_FLASH_HOST_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_FLASH_HOST_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_FLASH_HOST_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "ipc/ipc_message.h" | |
10 #include "ppapi/host/host_message_context.h" | 9 #include "ppapi/host/host_message_context.h" |
11 #include "ppapi/host/resource_host.h" | 10 #include "ppapi/host/resource_host.h" |
12 #include "ppapi/proxy/proxy_completion_callback_factory.h" | |
13 | 11 |
14 namespace content { | 12 namespace content { |
15 | 13 |
16 class RendererPpapiHost; | 14 class RendererPpapiHost; |
17 | 15 |
18 class PepperFlashHost | 16 class PepperFlashHost |
19 : public ppapi::host::ResourceHost { | 17 : public ppapi::host::ResourceHost { |
20 public: | 18 public: |
21 PepperFlashHost(RendererPpapiHost* host, | 19 PepperFlashHost(RendererPpapiHost* host, |
22 PP_Instance instance, | 20 PP_Instance instance, |
23 PP_Resource resource); | 21 PP_Resource resource); |
24 virtual ~PepperFlashHost(); | 22 virtual ~PepperFlashHost(); |
25 | 23 |
26 virtual int32_t OnResourceMessageReceived( | 24 virtual int32_t OnResourceMessageReceived( |
27 const IPC::Message& msg, | 25 const IPC::Message& msg, |
28 ppapi::host::HostMessageContext* context) OVERRIDE; | 26 ppapi::host::HostMessageContext* context) OVERRIDE; |
29 | 27 |
30 int32_t OnMsgEnumerateVideoCaptureDevices( | |
31 ppapi::host::HostMessageContext* host_context, | |
32 const ppapi::HostResource& host_resource); | |
33 private: | 28 private: |
34 void OnEnumerateVideoCaptureDevicesComplete( | |
35 int32_t result, | |
36 ppapi::host::ReplyMessageContext reply_message_context, | |
37 const ppapi::HostResource& host_resource); | |
38 | |
39 ppapi::proxy::ProxyCompletionCallbackFactory<PepperFlashHost> | |
40 callback_factory_; | |
41 | |
42 DISALLOW_COPY_AND_ASSIGN(PepperFlashHost); | 29 DISALLOW_COPY_AND_ASSIGN(PepperFlashHost); |
43 }; | 30 }; |
44 | 31 |
45 } // namespace content | 32 } // namespace content |
46 | 33 |
47 #endif // CONTENT_RENDERER_PEPPER_PEPPER_FLASH_HOST_H_ | 34 #endif // CONTENT_RENDERER_PEPPER_PEPPER_FLASH_HOST_H_ |
OLD | NEW |