| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PROXY_PPP_PDF_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPP_PDF_PROXY_H_ |
| 6 #define PPAPI_PROXY_PPP_PDF_PROXY_H_ | 6 #define PPAPI_PROXY_PPP_PDF_PROXY_H_ |
| 7 | 7 |
| 8 #include <vector> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "ppapi/c/private/ppp_pdf.h" | 11 #include "ppapi/c/private/ppp_pdf.h" |
| 10 #include "ppapi/proxy/interface_proxy.h" | 12 #include "ppapi/proxy/interface_proxy.h" |
| 11 | 13 |
| 12 namespace ppapi { | 14 namespace ppapi { |
| 13 | 15 |
| 14 namespace proxy { | 16 namespace proxy { |
| 15 | 17 |
| 16 class PPP_Pdf_Proxy : public InterfaceProxy { | 18 class PPP_Pdf_Proxy : public InterfaceProxy { |
| 17 public: | 19 public: |
| 18 PPP_Pdf_Proxy(Dispatcher* dispatcher); | 20 PPP_Pdf_Proxy(Dispatcher* dispatcher); |
| 19 virtual ~PPP_Pdf_Proxy(); | 21 virtual ~PPP_Pdf_Proxy(); |
| 20 | 22 |
| 21 static const PPP_Pdf* GetProxyInterface(); | 23 static const PPP_Pdf* GetProxyInterface(); |
| 22 | 24 |
| 23 // InterfaceProxy implementation. | 25 // InterfaceProxy implementation. |
| 24 virtual bool OnMessageReceived(const IPC::Message& msg); | 26 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 25 | 27 |
| 26 private: | 28 private: |
| 27 // Message handlers. | 29 // Message handlers. |
| 28 void OnPluginMsgRotate(PP_Instance instance, bool clockwise); | 30 void OnPluginMsgRotate(PP_Instance instance, bool clockwise); |
| 29 void OnPluginMsgPrintPresetOptions(PP_Instance instance, | 31 void OnPluginMsgPrintPresetOptions(PP_Instance instance, |
| 30 PP_PdfPrintPresetOptions_Dev* options, | 32 PP_PdfPrintPresetOptions_Dev* options, |
| 31 PP_Bool* result); | 33 PP_Bool* result); |
| 34 void OnPluginMsgEnableAccessibility(PP_Instance instance); |
| 32 | 35 |
| 33 // When this proxy is in the plugin side, this value caches the interface | 36 // When this proxy is in the plugin side, this value caches the interface |
| 34 // pointer so we don't have to retrieve it from the dispatcher each time. | 37 // pointer so we don't have to retrieve it from the dispatcher each time. |
| 35 // In the host, this value is always NULL. | 38 // In the host, this value is always NULL. |
| 36 const PPP_Pdf* ppp_pdf_; | 39 const PPP_Pdf* ppp_pdf_; |
| 37 | 40 |
| 38 DISALLOW_COPY_AND_ASSIGN(PPP_Pdf_Proxy); | 41 DISALLOW_COPY_AND_ASSIGN(PPP_Pdf_Proxy); |
| 39 }; | 42 }; |
| 40 | 43 |
| 41 } // namespace proxy | 44 } // namespace proxy |
| 42 } // namespace ppapi | 45 } // namespace ppapi |
| 43 | 46 |
| 44 #endif // PPAPI_PROXY_PPP_PDF_PROXY_H_ | 47 #endif // PPAPI_PROXY_PPP_PDF_PROXY_H_ |
| OLD | NEW |