Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: content/renderer/pepper/pepper_flash_renderer_host.h

Issue 11510008: Refactor 4 PPB_Flash functions to the new PPAPI resource model. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/renderer/pepper/pepper_flash_renderer_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <vector>
10
8 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/weak_ptr.h"
9 #include "ppapi/host/host_message_context.h" 13 #include "ppapi/host/host_message_context.h"
10 #include "ppapi/host/resource_host.h" 14 #include "ppapi/host/resource_host.h"
11 15
16 struct PP_Rect;
17
18 namespace ppapi {
19 struct URLRequestInfoData;
20 }
21
22 namespace ppapi {
23 namespace proxy {
24 struct PPBFlash_DrawGlyphs_Params;
25 }
26 }
27
12 namespace content { 28 namespace content {
13 29
14 class RendererPpapiHost; 30 class RendererPpapiHost;
15 31
16 class PepperFlashRendererHost : public ppapi::host::ResourceHost { 32 class PepperFlashRendererHost : public ppapi::host::ResourceHost {
17 public: 33 public:
18 PepperFlashRendererHost(RendererPpapiHost* host, 34 PepperFlashRendererHost(RendererPpapiHost* host,
19 PP_Instance instance, 35 PP_Instance instance,
20 PP_Resource resource); 36 PP_Resource resource);
21 virtual ~PepperFlashRendererHost(); 37 virtual ~PepperFlashRendererHost();
22 38
23 // ppapi::host::ResourceHost override. 39 // ppapi::host::ResourceHost override.
24 virtual int32_t OnResourceMessageReceived( 40 virtual int32_t OnResourceMessageReceived(
25 const IPC::Message& msg, 41 const IPC::Message& msg,
26 ppapi::host::HostMessageContext* context) OVERRIDE; 42 ppapi::host::HostMessageContext* context) OVERRIDE;
27 43
28 private: 44 private:
29 int32_t OnMsgGetProxyForURL(ppapi::host::HostMessageContext* host_context, 45 int32_t OnMsgGetProxyForURL(ppapi::host::HostMessageContext* host_context,
30 const std::string& url); 46 const std::string& url);
47 int32_t OnMsgSetInstanceAlwaysOnTop(
48 ppapi::host::HostMessageContext* host_context,
49 bool on_top);
50 int32_t OnMsgDrawGlyphs(ppapi::host::HostMessageContext* host_context,
51 ppapi::proxy::PPBFlash_DrawGlyphs_Params params);
52 int32_t OnMsgNavigate(ppapi::host::HostMessageContext* host_context,
53 const ppapi::URLRequestInfoData& data,
54 const std::string& target,
55 bool from_user_action);
56 int32_t OnMsgIsRectTopmost(ppapi::host::HostMessageContext* host_context,
57 const PP_Rect& rect);
58
59 base::WeakPtrFactory<PepperFlashRendererHost> weak_factory_;
60 // A stack of ReplyMessageContexts to track Navigate() calls which have not
61 // yet been replied to.
62 std::vector<ppapi::host::ReplyMessageContext> navigate_replies_;
63
64 RendererPpapiHost* host_;
31 65
32 DISALLOW_COPY_AND_ASSIGN(PepperFlashRendererHost); 66 DISALLOW_COPY_AND_ASSIGN(PepperFlashRendererHost);
33 }; 67 };
34 68
35 } // namespace content 69 } // namespace content
36 70
37 #endif // CONTENT_RENDERER_PEPPER_PEPPER_FLASH_RENDERER_HOST_H_ 71 #endif // CONTENT_RENDERER_PEPPER_PEPPER_FLASH_RENDERER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/pepper/pepper_flash_renderer_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698