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_RENDERER_HOST_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_FLASH_RENDERER_HOST_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_FLASH_RENDERER_HOST_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_FLASH_RENDERER_HOST_H_ |
7 | 7 |
| 8 #include <string> |
| 9 |
8 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
9 #include "ppapi/host/host_message_context.h" | 11 #include "ppapi/host/host_message_context.h" |
10 #include "ppapi/host/resource_host.h" | 12 #include "ppapi/host/resource_host.h" |
11 | 13 |
| 14 struct PP_Rect; |
| 15 |
| 16 namespace ppapi { |
| 17 struct URLRequestInfoData; |
| 18 } |
| 19 |
| 20 namespace ppapi { |
| 21 namespace proxy { |
| 22 struct PPBFlash_DrawGlyphs_Params; |
| 23 } |
| 24 } |
| 25 |
12 namespace content { | 26 namespace content { |
13 | 27 |
14 class RendererPpapiHost; | 28 class RendererPpapiHost; |
15 | 29 |
16 class PepperFlashRendererHost : public ppapi::host::ResourceHost { | 30 class PepperFlashRendererHost : public ppapi::host::ResourceHost { |
17 public: | 31 public: |
18 PepperFlashRendererHost(RendererPpapiHost* host, | 32 PepperFlashRendererHost(RendererPpapiHost* host, |
19 PP_Instance instance, | 33 PP_Instance instance, |
20 PP_Resource resource); | 34 PP_Resource resource); |
21 virtual ~PepperFlashRendererHost(); | 35 virtual ~PepperFlashRendererHost(); |
22 | 36 |
23 // ppapi::host::ResourceHost override. | 37 // ppapi::host::ResourceHost override. |
24 virtual int32_t OnResourceMessageReceived( | 38 virtual int32_t OnResourceMessageReceived( |
25 const IPC::Message& msg, | 39 const IPC::Message& msg, |
26 ppapi::host::HostMessageContext* context) OVERRIDE; | 40 ppapi::host::HostMessageContext* context) OVERRIDE; |
27 | 41 |
28 private: | 42 private: |
29 int32_t OnMsgGetProxyForURL(ppapi::host::HostMessageContext* host_context, | 43 int32_t OnMsgGetProxyForURL(ppapi::host::HostMessageContext* host_context, |
30 const std::string& url); | 44 const std::string& url); |
| 45 int32_t OnMsgSetInstanceAlwaysOnTop( |
| 46 ppapi::host::HostMessageContext* host_context, |
| 47 bool on_top); |
| 48 int32_t OnMsgDrawGlyphs(ppapi::host::HostMessageContext* host_context, |
| 49 ppapi::proxy::PPBFlash_DrawGlyphs_Params params); |
| 50 int32_t OnMsgNavigate(ppapi::host::HostMessageContext* host_context, |
| 51 const ppapi::URLRequestInfoData& data, |
| 52 const std::string& target, |
| 53 bool from_user_action); |
| 54 int32_t OnMsgIsRectTopmost(ppapi::host::HostMessageContext* host_context, |
| 55 const PP_Rect& rect); |
| 56 |
| 57 RendererPpapiHost* host_; |
31 | 58 |
32 DISALLOW_COPY_AND_ASSIGN(PepperFlashRendererHost); | 59 DISALLOW_COPY_AND_ASSIGN(PepperFlashRendererHost); |
33 }; | 60 }; |
34 | 61 |
35 } // namespace content | 62 } // namespace content |
36 | 63 |
37 #endif // CONTENT_RENDERER_PEPPER_PEPPER_FLASH_RENDERER_HOST_H_ | 64 #endif // CONTENT_RENDERER_PEPPER_PEPPER_FLASH_RENDERER_HOST_H_ |
OLD | NEW |