Chromium Code Reviews| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 154 enter.functions()->SetSelectedText(selected_text); | 154 enter.functions()->SetSelectedText(selected_text); |
| 155 } | 155 } |
| 156 | 156 |
| 157 void SetLinkUnderCursor(PP_Instance instance, const char* url) { | 157 void SetLinkUnderCursor(PP_Instance instance, const char* url) { |
| 158 EnterInstanceAPI<PPB_PDF_API> enter(instance); | 158 EnterInstanceAPI<PPB_PDF_API> enter(instance); |
| 159 if (enter.failed()) | 159 if (enter.failed()) |
| 160 return; | 160 return; |
| 161 enter.functions()->SetLinkUnderCursor(url); | 161 enter.functions()->SetLinkUnderCursor(url); |
| 162 } | 162 } |
| 163 | 163 |
| 164 void GetV8ExternalSnapshotData(PP_Instance instance, | |
| 165 const char** natives_data_out, | |
| 166 int* natives_size_out, | |
| 167 const char** snapshot_data_out, | |
| 168 int* snapshot_size_out) { | |
| 169 EnterInstanceAPI<PPB_PDF_API> enter(instance); | |
| 170 if (enter.failed()) | |
| 171 return; | |
| 172 enter.functions()->GetV8ExternalSnapshotData(natives_data_out, | |
| 173 natives_size_out, snapshot_data_out, snapshot_size_out); | |
|
raymes
2014/11/11 03:26:39
nit: 4 space indent
baixo1
2014/11/11 10:56:11
Done.
| |
| 174 } | |
| 175 | |
| 164 const PPB_PDF g_ppb_pdf_thunk = { | 176 const PPB_PDF g_ppb_pdf_thunk = { |
| 165 &GetLocalizedString, | 177 &GetLocalizedString, |
| 166 &GetResourceImage, | 178 &GetResourceImage, |
| 167 &GetFontFileWithFallback, | 179 &GetFontFileWithFallback, |
| 168 &GetFontTableForPrivateFontFile, | 180 &GetFontTableForPrivateFontFile, |
| 169 &SearchString, | 181 &SearchString, |
| 170 &DidStartLoading, | 182 &DidStartLoading, |
| 171 &DidStopLoading, | 183 &DidStopLoading, |
| 172 &SetContentRestriction, | 184 &SetContentRestriction, |
| 173 &HistogramPDFPageCount, | 185 &HistogramPDFPageCount, |
| 174 &UserMetricsRecordAction, | 186 &UserMetricsRecordAction, |
| 175 &HasUnsupportedFeature, | 187 &HasUnsupportedFeature, |
| 176 &SaveAs, | 188 &SaveAs, |
| 177 &Print, | 189 &Print, |
| 178 &IsFeatureEnabled, | 190 &IsFeatureEnabled, |
| 179 &GetResourceImageForScale, | 191 &GetResourceImageForScale, |
| 180 &ModalPromptForPassword, | 192 &ModalPromptForPassword, |
| 181 &IsOutOfProcess, | 193 &IsOutOfProcess, |
| 182 &SetSelectedText, | 194 &SetSelectedText, |
| 183 &SetLinkUnderCursor, | 195 &SetLinkUnderCursor, |
| 196 &GetV8ExternalSnapshotData, | |
| 184 }; | 197 }; |
| 185 | 198 |
| 186 } // namespace | 199 } // namespace |
| 187 | 200 |
| 188 const PPB_PDF* GetPPB_PDF_Thunk() { | 201 const PPB_PDF* GetPPB_PDF_Thunk() { |
| 189 return &g_ppb_pdf_thunk; | 202 return &g_ppb_pdf_thunk; |
| 190 } | 203 } |
| 191 | 204 |
| 192 } // namespace thunk | 205 } // namespace thunk |
| 193 } // namespace ppapi | 206 } // namespace ppapi |
| OLD | NEW |