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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ppapi/c/pp_errors.h" | 8 #include "ppapi/c/pp_errors.h" |
9 #include "ppapi/c/private/ppb_pdf.h" | 9 #include "ppapi/c/private/ppb_pdf.h" |
10 #include "ppapi/thunk/enter.h" | 10 #include "ppapi/thunk/enter.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 PP_Instance instance, | 153 PP_Instance instance, |
154 PP_PrivateAccessibilityPageInfo* page_info, | 154 PP_PrivateAccessibilityPageInfo* page_info, |
155 PP_PrivateAccessibilityTextRunInfo text_runs[], | 155 PP_PrivateAccessibilityTextRunInfo text_runs[], |
156 PP_PrivateAccessibilityCharInfo chars[]) { | 156 PP_PrivateAccessibilityCharInfo chars[]) { |
157 EnterInstanceAPI<PPB_PDF_API> enter(instance); | 157 EnterInstanceAPI<PPB_PDF_API> enter(instance); |
158 if (enter.failed()) | 158 if (enter.failed()) |
159 return; | 159 return; |
160 enter.functions()->SetAccessibilityPageInfo(page_info, text_runs, chars); | 160 enter.functions()->SetAccessibilityPageInfo(page_info, text_runs, chars); |
161 } | 161 } |
162 | 162 |
| 163 void SetCrashData(PP_Instance instance, |
| 164 const char* pdf_url, |
| 165 const char* top_level_url) { |
| 166 EnterInstanceAPI<PPB_PDF_API> enter(instance); |
| 167 if (enter.failed()) |
| 168 return; |
| 169 enter.functions()->SetCrashData(pdf_url, top_level_url); |
| 170 } |
| 171 |
163 const PPB_PDF g_ppb_pdf_thunk = { | 172 const PPB_PDF g_ppb_pdf_thunk = { |
164 &GetFontFileWithFallback, | 173 &GetFontFileWithFallback, |
165 &GetFontTableForPrivateFontFile, | 174 &GetFontTableForPrivateFontFile, |
166 &SearchString, | 175 &SearchString, |
167 &DidStartLoading, | 176 &DidStartLoading, |
168 &DidStopLoading, | 177 &DidStopLoading, |
169 &SetContentRestriction, | 178 &SetContentRestriction, |
170 &UserMetricsRecordAction, | 179 &UserMetricsRecordAction, |
171 &HasUnsupportedFeature, | 180 &HasUnsupportedFeature, |
172 &SaveAs, | 181 &SaveAs, |
173 &Print, | 182 &Print, |
174 &IsFeatureEnabled, | 183 &IsFeatureEnabled, |
175 &SetSelectedText, | 184 &SetSelectedText, |
176 &SetLinkUnderCursor, | 185 &SetLinkUnderCursor, |
177 &GetV8ExternalSnapshotData, | 186 &GetV8ExternalSnapshotData, |
178 &SetAccessibilityViewportInfo, | 187 &SetAccessibilityViewportInfo, |
179 &SetAccessibilityDocInfo, | 188 &SetAccessibilityDocInfo, |
180 &SetAccessibilityPageInfo | 189 &SetAccessibilityPageInfo, |
| 190 &SetCrashData, |
181 }; | 191 }; |
182 | 192 |
183 } // namespace | 193 } // namespace |
184 | 194 |
185 const PPB_PDF* GetPPB_PDF_Thunk() { | 195 const PPB_PDF* GetPPB_PDF_Thunk() { |
186 return &g_ppb_pdf_thunk; | 196 return &g_ppb_pdf_thunk; |
187 } | 197 } |
188 | 198 |
189 } // namespace thunk | 199 } // namespace thunk |
190 } // namespace ppapi | 200 } // namespace ppapi |
OLD | NEW |