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

Side by Side Diff: ppapi/proxy/ppb_pdf_proxy.h

Issue 7844018: Revert 100748 - This patch tries to remove most of the manual registration for Pepper interfaces,... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 months 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 | « ppapi/proxy/ppb_opengles2_proxy.cc ('k') | ppapi/proxy/ppb_pdf_proxy.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 PPAPI_PPB_PDF_PROXY_H_ 5 #ifndef PPAPI_PPB_PDF_PROXY_H_
6 #define PPAPI_PPB_PDF_PROXY_H_ 6 #define PPAPI_PPB_PDF_PROXY_H_
7 7
8 #include "ppapi/c/pp_module.h" 8 #include "ppapi/c/pp_module.h"
9 #include "ppapi/proxy/interface_proxy.h" 9 #include "ppapi/proxy/interface_proxy.h"
10 #include "ppapi/shared_impl/host_resource.h" 10 #include "ppapi/shared_impl/host_resource.h"
11 11
12 struct PPB_PDF; 12 struct PPB_PDF;
13 13
14 namespace ppapi { 14 namespace ppapi {
15 namespace proxy { 15 namespace proxy {
16 16
17 struct SerializedFontDescription; 17 struct SerializedFontDescription;
18 18
19 class PPB_PDF_Proxy : public InterfaceProxy { 19 class PPB_PDF_Proxy : public InterfaceProxy {
20 public: 20 public:
21 PPB_PDF_Proxy(Dispatcher* dispatcher); 21 PPB_PDF_Proxy(Dispatcher* dispatcher, const void* target_interface);
22 virtual ~PPB_PDF_Proxy(); 22 virtual ~PPB_PDF_Proxy();
23 23
24 static const Info* GetInfo(); 24 static const Info* GetInfo();
25 25
26 const PPB_PDF* ppb_pdf_target() const {
27 return static_cast<const PPB_PDF*>(target_interface());
28 }
29
26 // InterfaceProxy implementation. 30 // InterfaceProxy implementation.
27 virtual bool OnMessageReceived(const IPC::Message& msg); 31 virtual bool OnMessageReceived(const IPC::Message& msg);
28 32
29 private: 33 private:
30 // Message handlers. 34 // Message handlers.
31 void OnMsgGetFontFileWithFallback(PP_Module module, 35 void OnMsgGetFontFileWithFallback(PP_Module module,
32 const SerializedFontDescription& desc, 36 const SerializedFontDescription& desc,
33 int32_t charset, 37 int32_t charset,
34 ppapi::HostResource* result); 38 ppapi::HostResource* result);
35 void OnMsgGetFontTableForPrivateFontFile(const ppapi::HostResource& font_file, 39 void OnMsgGetFontTableForPrivateFontFile(const ppapi::HostResource& font_file,
36 uint32_t table, 40 uint32_t table,
37 std::string* result); 41 std::string* result);
38
39 // When this proxy is in the host side, this value caches the interface
40 // pointer so we don't have to retrieve it from the dispatcher each time.
41 // In the plugin, this value is always NULL.
42 const PPB_PDF* ppb_pdf_impl_;
43 }; 42 };
44 43
45 } // namespace proxy 44 } // namespace proxy
46 } // namespace ppapi 45 } // namespace ppapi
47 46
48 #endif // PPAPI_PPB_PDF_PROXY_H_ 47 #endif // PPAPI_PPB_PDF_PROXY_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_opengles2_proxy.cc ('k') | ppapi/proxy/ppb_pdf_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698