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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 int* natives_size_out, | 124 int* natives_size_out, |
125 const char** snapshot_data_out, | 125 const char** snapshot_data_out, |
126 int* snapshot_size_out) { | 126 int* snapshot_size_out) { |
127 EnterInstanceAPI<PPB_PDF_API> enter(instance); | 127 EnterInstanceAPI<PPB_PDF_API> enter(instance); |
128 if (enter.failed()) | 128 if (enter.failed()) |
129 return; | 129 return; |
130 enter.functions()->GetV8ExternalSnapshotData(natives_data_out, | 130 enter.functions()->GetV8ExternalSnapshotData(natives_data_out, |
131 natives_size_out, snapshot_data_out, snapshot_size_out); | 131 natives_size_out, snapshot_data_out, snapshot_size_out); |
132 } | 132 } |
133 | 133 |
| 134 void SetAccessibilityViewportInfo( |
| 135 PP_Instance instance, |
| 136 PP_PrivateAccessibilityViewportInfo* viewport_info) { |
| 137 EnterInstanceAPI<PPB_PDF_API> enter(instance); |
| 138 if (enter.failed()) |
| 139 return; |
| 140 enter.functions()->SetAccessibilityViewportInfo(viewport_info); |
| 141 } |
| 142 |
| 143 void SetAccessibilityDocInfo( |
| 144 PP_Instance instance, |
| 145 PP_PrivateAccessibilityDocInfo* doc_info) { |
| 146 EnterInstanceAPI<PPB_PDF_API> enter(instance); |
| 147 if (enter.failed()) |
| 148 return; |
| 149 enter.functions()->SetAccessibilityDocInfo(doc_info); |
| 150 } |
| 151 |
| 152 void SetAccessibilityPageInfo( |
| 153 PP_Instance instance, |
| 154 PP_PrivateAccessibilityPageInfo* page_info, |
| 155 PP_PrivateAccessibilityTextRunInfo text_runs[], |
| 156 PP_PrivateAccessibilityCharInfo chars[]) { |
| 157 EnterInstanceAPI<PPB_PDF_API> enter(instance); |
| 158 if (enter.failed()) |
| 159 return; |
| 160 enter.functions()->SetAccessibilityPageInfo(page_info, text_runs, chars); |
| 161 } |
| 162 |
134 const PPB_PDF g_ppb_pdf_thunk = { | 163 const PPB_PDF g_ppb_pdf_thunk = { |
135 &GetFontFileWithFallback, | 164 &GetFontFileWithFallback, |
136 &GetFontTableForPrivateFontFile, | 165 &GetFontTableForPrivateFontFile, |
137 &SearchString, | 166 &SearchString, |
138 &DidStartLoading, | 167 &DidStartLoading, |
139 &DidStopLoading, | 168 &DidStopLoading, |
140 &SetContentRestriction, | 169 &SetContentRestriction, |
141 &UserMetricsRecordAction, | 170 &UserMetricsRecordAction, |
142 &HasUnsupportedFeature, | 171 &HasUnsupportedFeature, |
143 &SaveAs, | 172 &SaveAs, |
144 &Print, | 173 &Print, |
145 &IsFeatureEnabled, | 174 &IsFeatureEnabled, |
146 &SetSelectedText, | 175 &SetSelectedText, |
147 &SetLinkUnderCursor, | 176 &SetLinkUnderCursor, |
148 &GetV8ExternalSnapshotData, | 177 &GetV8ExternalSnapshotData, |
| 178 &SetAccessibilityViewportInfo, |
| 179 &SetAccessibilityDocInfo, |
| 180 &SetAccessibilityPageInfo |
149 }; | 181 }; |
150 | 182 |
151 } // namespace | 183 } // namespace |
152 | 184 |
153 const PPB_PDF* GetPPB_PDF_Thunk() { | 185 const PPB_PDF* GetPPB_PDF_Thunk() { |
154 return &g_ppb_pdf_thunk; | 186 return &g_ppb_pdf_thunk; |
155 } | 187 } |
156 | 188 |
157 } // namespace thunk | 189 } // namespace thunk |
158 } // namespace ppapi | 190 } // namespace ppapi |
OLD | NEW |