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 | |
10 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
11 #include "ppapi/host/host_message_context.h" | 9 #include "ppapi/host/host_message_context.h" |
12 #include "ppapi/host/resource_host.h" | 10 #include "ppapi/host/resource_host.h" |
13 | 11 |
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 | |
26 namespace content { | 12 namespace content { |
27 | 13 |
28 class RendererPpapiHost; | 14 class RendererPpapiHost; |
29 | 15 |
30 class PepperFlashRendererHost : public ppapi::host::ResourceHost { | 16 class PepperFlashRendererHost : public ppapi::host::ResourceHost { |
31 public: | 17 public: |
32 PepperFlashRendererHost(RendererPpapiHost* host, | 18 PepperFlashRendererHost(RendererPpapiHost* host, |
33 PP_Instance instance, | 19 PP_Instance instance, |
34 PP_Resource resource); | 20 PP_Resource resource); |
35 virtual ~PepperFlashRendererHost(); | 21 virtual ~PepperFlashRendererHost(); |
36 | 22 |
37 // ppapi::host::ResourceHost override. | 23 // ppapi::host::ResourceHost override. |
38 virtual int32_t OnResourceMessageReceived( | 24 virtual int32_t OnResourceMessageReceived( |
39 const IPC::Message& msg, | 25 const IPC::Message& msg, |
40 ppapi::host::HostMessageContext* context) OVERRIDE; | 26 ppapi::host::HostMessageContext* context) OVERRIDE; |
41 | 27 |
42 private: | 28 private: |
43 int32_t OnMsgGetProxyForURL(ppapi::host::HostMessageContext* host_context, | 29 int32_t OnMsgGetProxyForURL(ppapi::host::HostMessageContext* host_context, |
44 const std::string& url); | 30 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_; | |
58 | 31 |
59 DISALLOW_COPY_AND_ASSIGN(PepperFlashRendererHost); | 32 DISALLOW_COPY_AND_ASSIGN(PepperFlashRendererHost); |
60 }; | 33 }; |
61 | 34 |
62 } // namespace content | 35 } // namespace content |
63 | 36 |
64 #endif // CONTENT_RENDERER_PEPPER_PEPPER_FLASH_RENDERER_HOST_H_ | 37 #endif // CONTENT_RENDERER_PEPPER_PEPPER_FLASH_RENDERER_HOST_H_ |
OLD | NEW |