OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "base/logging.h" | 5 #include "base/logging.h" |
6 #include "ppapi/c/pp_errors.h" | 6 #include "ppapi/c/pp_errors.h" |
7 #include "ppapi/c/private/ppb_pdf.h" | 7 #include "ppapi/c/private/ppb_pdf.h" |
8 #include "ppapi/thunk/enter.h" | 8 #include "ppapi/thunk/enter.h" |
9 #include "ppapi/thunk/ppb_flash_font_file_api.h" | 9 #include "ppapi/thunk/ppb_flash_font_file_api.h" |
10 #include "ppapi/thunk/ppb_pdf_api.h" | 10 #include "ppapi/thunk/ppb_pdf_api.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 if (enter.succeeded()) | 98 if (enter.succeeded()) |
99 enter.functions()->UserMetricsRecordAction(action); | 99 enter.functions()->UserMetricsRecordAction(action); |
100 } | 100 } |
101 | 101 |
102 void HasUnsupportedFeature(PP_Instance instance) { | 102 void HasUnsupportedFeature(PP_Instance instance) { |
103 EnterInstanceAPI<PPB_PDF_API> enter(instance); | 103 EnterInstanceAPI<PPB_PDF_API> enter(instance); |
104 if (enter.succeeded()) | 104 if (enter.succeeded()) |
105 enter.functions()->HasUnsupportedFeature(); | 105 enter.functions()->HasUnsupportedFeature(); |
106 } | 106 } |
107 | 107 |
108 void SaveAs(PP_Instance instance) { | 108 void SaveAs(PP_Instance instance, PP_Var url) { |
109 EnterInstanceAPI<PPB_PDF_API> enter(instance); | 109 EnterInstanceAPI<PPB_PDF_API> enter(instance); |
110 if (enter.succeeded()) | 110 if (enter.succeeded()) |
111 enter.functions()->SaveAs(); | 111 enter.functions()->SaveAs(url); |
112 } | 112 } |
113 | 113 |
114 void Print(PP_Instance instance) { | 114 void Print(PP_Instance instance) { |
115 EnterInstanceAPI<PPB_PDF_API> enter(instance); | 115 EnterInstanceAPI<PPB_PDF_API> enter(instance); |
116 if (enter.succeeded()) | 116 if (enter.succeeded()) |
117 enter.functions()->Print(); | 117 enter.functions()->Print(); |
118 } | 118 } |
119 | 119 |
120 PP_Bool IsFeatureEnabled(PP_Instance instance, PP_PDFFeature feature) { | 120 PP_Bool IsFeatureEnabled(PP_Instance instance, PP_PDFFeature feature) { |
121 EnterInstanceAPI<PPB_PDF_API> enter(instance); | 121 EnterInstanceAPI<PPB_PDF_API> enter(instance); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 }; | 184 }; |
185 | 185 |
186 } // namespace | 186 } // namespace |
187 | 187 |
188 const PPB_PDF* GetPPB_PDF_Thunk() { | 188 const PPB_PDF* GetPPB_PDF_Thunk() { |
189 return &g_ppb_pdf_thunk; | 189 return &g_ppb_pdf_thunk; |
190 } | 190 } |
191 | 191 |
192 } // namespace thunk | 192 } // namespace thunk |
193 } // namespace ppapi | 193 } // namespace ppapi |
OLD | NEW |