| OLD | NEW | 
|    1 // Copyright 2014 PDFium Authors. All rights reserved. |    1 // Copyright 2014 PDFium 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |    5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 
|    6  |    6  | 
|    7 #ifndef FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_ |    7 #ifndef FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_ | 
|    8 #define FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_ |    8 #define FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_ | 
|    9  |    9  | 
|   10 #include "../../core/include/fpdfdoc/fpdf_doc.h" |   10 #include "../../core/include/fpdfdoc/fpdf_doc.h" | 
|   11 #include "../../core/include/fxcrt/fx_string.h" |   11 #include "../../core/include/fxcrt/fx_string.h" | 
|   12 #include "../../third_party/base/nonstd_unique_ptr.h" |   12 #include "../../third_party/base/nonstd_unique_ptr.h" | 
|   13 #include "fsdk_baseform.h" |   13 #include "fsdk_baseform.h" | 
|   14  |   14  | 
|   15 class CFX_PtrList; |   15 class CFX_PtrList; | 
|   16 class CPDFDoc_Environment; |  | 
|   17 class CPDFSDK_Annot; |   16 class CPDFSDK_Annot; | 
|   18 class CPDFSDK_Document; |   17 class CPDFSDK_Document; | 
|   19 class CPDF_Bookmark; |   18 class CPDF_Bookmark; | 
|   20 class CPDF_Dictionary; |   19 class CPDF_Dictionary; | 
|   21 class IFXJS_Runtime; |  | 
|   22  |   20  | 
|   23 class CPDFSDK_FormActionHandler { |   21 class CPDFSDK_FormActionHandler { | 
|   24  public: |   22  public: | 
|   25   FX_BOOL DoAction_Hide(const CPDF_Action& action, CPDFSDK_Document* pDocument); |   23   FX_BOOL DoAction_Hide(const CPDF_Action& action, CPDFSDK_Document* pDocument); | 
|   26   FX_BOOL DoAction_SubmitForm(const CPDF_Action& action, |   24   FX_BOOL DoAction_SubmitForm(const CPDF_Action& action, | 
|   27                               CPDFSDK_Document* pDocument); |   25                               CPDFSDK_Document* pDocument); | 
|   28   FX_BOOL DoAction_ResetForm(const CPDF_Action& action, |   26   FX_BOOL DoAction_ResetForm(const CPDF_Action& action, | 
|   29                              CPDFSDK_Document* pDocument); |   27                              CPDFSDK_Document* pDocument); | 
|   30   FX_BOOL DoAction_ImportData(const CPDF_Action& action, |   28   FX_BOOL DoAction_ImportData(const CPDF_Action& action, | 
|   31                               CPDFSDK_Document* pDocument); |   29                               CPDFSDK_Document* pDocument); | 
|   32 }; |   30 }; | 
|   33  |   31  | 
|   34 class CPDFSDK_MediaActionHandler { |  | 
|   35  public: |  | 
|   36   FX_BOOL DoAction_Rendition(const CPDF_Action& action, |  | 
|   37                              CPDFSDK_Document* pDocument); |  | 
|   38   FX_BOOL DoAction_Sound(const CPDF_Action& action, |  | 
|   39                          CPDFSDK_Document* pDocument); |  | 
|   40   FX_BOOL DoAction_Movie(const CPDF_Action& action, |  | 
|   41                          CPDFSDK_Document* pDocument); |  | 
|   42 }; |  | 
|   43  |  | 
|   44 class CPDFSDK_ActionHandler { |   32 class CPDFSDK_ActionHandler { | 
|   45  public: |   33  public: | 
|   46   CPDFSDK_ActionHandler(CPDFDoc_Environment* pEvi); |   34   CPDFSDK_ActionHandler(); | 
|   47  |  | 
|   48   void SetMediaActionHandler(CPDFSDK_MediaActionHandler* pHandler); |  | 
|   49  |   35  | 
|   50   FX_BOOL DoAction_DocOpen(const CPDF_Action& action, |   36   FX_BOOL DoAction_DocOpen(const CPDF_Action& action, | 
|   51                            CPDFSDK_Document* pDocument); |   37                            CPDFSDK_Document* pDocument); | 
|   52   FX_BOOL DoAction_JavaScript(const CPDF_Action& JsAction, |   38   FX_BOOL DoAction_JavaScript(const CPDF_Action& JsAction, | 
|   53                               CFX_WideString csJSName, |   39                               CFX_WideString csJSName, | 
|   54                               CPDFSDK_Document* pDocument); |   40                               CPDFSDK_Document* pDocument); | 
|   55   FX_BOOL DoAction_Page(const CPDF_Action& action, |   41   FX_BOOL DoAction_Page(const CPDF_Action& action, | 
|   56                         enum CPDF_AAction::AActionType eType, |   42                         enum CPDF_AAction::AActionType eType, | 
|   57                         CPDFSDK_Document* pDocument); |   43                         CPDFSDK_Document* pDocument); | 
|   58   FX_BOOL DoAction_Document(const CPDF_Action& action, |   44   FX_BOOL DoAction_Document(const CPDF_Action& action, | 
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  124  |  110  | 
|  125   void DoAction_GoTo(CPDFSDK_Document* pDocument, const CPDF_Action& action); |  111   void DoAction_GoTo(CPDFSDK_Document* pDocument, const CPDF_Action& action); | 
|  126   void DoAction_GoToR(CPDFSDK_Document* pDocument, const CPDF_Action& action); |  112   void DoAction_GoToR(CPDFSDK_Document* pDocument, const CPDF_Action& action); | 
|  127   void DoAction_Launch(CPDFSDK_Document* pDocument, const CPDF_Action& action); |  113   void DoAction_Launch(CPDFSDK_Document* pDocument, const CPDF_Action& action); | 
|  128   void DoAction_URI(CPDFSDK_Document* pDocument, const CPDF_Action& action); |  114   void DoAction_URI(CPDFSDK_Document* pDocument, const CPDF_Action& action); | 
|  129   void DoAction_Named(CPDFSDK_Document* pDocument, const CPDF_Action& action); |  115   void DoAction_Named(CPDFSDK_Document* pDocument, const CPDF_Action& action); | 
|  130   void DoAction_SetOCGState(CPDFSDK_Document* pDocument, |  116   void DoAction_SetOCGState(CPDFSDK_Document* pDocument, | 
|  131                             const CPDF_Action& action); |  117                             const CPDF_Action& action); | 
|  132  |  118  | 
|  133   nonstd::unique_ptr<CPDFSDK_FormActionHandler> m_pFormActionHandler; |  119   nonstd::unique_ptr<CPDFSDK_FormActionHandler> m_pFormActionHandler; | 
|  134   CPDFSDK_MediaActionHandler* m_pMediaActionHandler; |  | 
|  135 }; |  120 }; | 
|  136  |  121  | 
|  137 #endif  // FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_ |  122 #endif  // FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_ | 
| OLD | NEW |