diff options
Diffstat (limited to 'webkit/plugins/ppapi/ppb_pdf_impl.cc')
-rw-r--r-- | webkit/plugins/ppapi/ppb_pdf_impl.cc | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/webkit/plugins/ppapi/ppb_pdf_impl.cc b/webkit/plugins/ppapi/ppb_pdf_impl.cc index f26cc18..9316e3a 100644 --- a/webkit/plugins/ppapi/ppb_pdf_impl.cc +++ b/webkit/plugins/ppapi/ppb_pdf_impl.cc @@ -55,9 +55,9 @@ struct ResourceImageInfo { }; static const ResourceImageInfo kResourceImageMap[] = { - { PP_RESOURCEIMAGE_PDF_BUTTON_FTH, IDR_PDF_BUTTON_FTH }, - { PP_RESOURCEIMAGE_PDF_BUTTON_FTH_HOVER, IDR_PDF_BUTTON_FTH_HOVER }, - { PP_RESOURCEIMAGE_PDF_BUTTON_FTH_PRESSED, IDR_PDF_BUTTON_FTH_PRESSED }, + { PP_RESOURCEIMAGE_PDF_BUTTON_FTP, IDR_PDF_BUTTON_FTP }, + { PP_RESOURCEIMAGE_PDF_BUTTON_FTP_HOVER, IDR_PDF_BUTTON_FTP_HOVER }, + { PP_RESOURCEIMAGE_PDF_BUTTON_FTP_PRESSED, IDR_PDF_BUTTON_FTP_PRESSED }, { PP_RESOURCEIMAGE_PDF_BUTTON_FTW, IDR_PDF_BUTTON_FTW }, { PP_RESOURCEIMAGE_PDF_BUTTON_FTW_HOVER, IDR_PDF_BUTTON_FTW_HOVER }, { PP_RESOURCEIMAGE_PDF_BUTTON_FTW_PRESSED, IDR_PDF_BUTTON_FTW_PRESSED }, @@ -68,6 +68,12 @@ static const ResourceImageInfo kResourceImageMap[] = { { PP_RESOURCEIMAGE_PDF_BUTTON_ZOOMOUT_HOVER, IDR_PDF_BUTTON_ZOOMOUT_HOVER }, { PP_RESOURCEIMAGE_PDF_BUTTON_ZOOMOUT_PRESSED, IDR_PDF_BUTTON_ZOOMOUT_PRESSED }, + { PP_RESOURCEIMAGE_PDF_BUTTON_SAVE, IDR_PDF_BUTTON_SAVE }, + { PP_RESOURCEIMAGE_PDF_BUTTON_SAVE_HOVER, IDR_PDF_BUTTON_SAVE_HOVER }, + { PP_RESOURCEIMAGE_PDF_BUTTON_SAVE_PRESSED, IDR_PDF_BUTTON_SAVE_PRESSED }, + { PP_RESOURCEIMAGE_PDF_BUTTON_PRINT, IDR_PDF_BUTTON_PRINT }, + { PP_RESOURCEIMAGE_PDF_BUTTON_PRINT_HOVER, IDR_PDF_BUTTON_PRINT_HOVER }, + { PP_RESOURCEIMAGE_PDF_BUTTON_PRINT_PRESSED, IDR_PDF_BUTTON_PRINT_PRESSED }, { PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_0, IDR_PDF_THUMBNAIL_0 }, { PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_1, IDR_PDF_THUMBNAIL_1 }, { PP_RESOURCEIMAGE_PDF_BUTTON_THUMBNAIL_2, IDR_PDF_THUMBNAIL_2 }, @@ -294,6 +300,13 @@ void HasUnsupportedFeature(PP_Instance instance_id) { instance->delegate()->HasUnsupportedFeature(); } +void SaveAs(PP_Instance instance_id) { + PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); + if (!instance) + return; + instance->delegate()->SaveAs(); +} + const PPB_PDF ppb_pdf = { &GetLocalizedString, &GetResourceImage, @@ -305,7 +318,8 @@ const PPB_PDF ppb_pdf = { &SetContentRestriction, &HistogramPDFPageCount, &UserMetricsRecordAction, - &HasUnsupportedFeature + &HasUnsupportedFeature, + &SaveAs }; } // namespace |