Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(507)

Side by Side Diff: fpdfsdk/include/fsdk_actionhandler.h

Issue 1611733002: Merge to XFA: Use std::set to track visited dictionaries in fsdk_actionhandler. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: TBR, automatic. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | fpdfsdk/src/fsdk_actionhandler.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <memory> 10 #include <memory>
11 #include <set>
11 12
12 #include "core/include/fpdfdoc/fpdf_doc.h" 13 #include "core/include/fpdfdoc/fpdf_doc.h"
13 #include "core/include/fxcrt/fx_string.h" 14 #include "core/include/fxcrt/fx_string.h"
14 #include "fsdk_baseform.h" 15 #include "fsdk_baseform.h"
15 16
16 class CFX_PtrList;
17 class CPDFSDK_Annot; 17 class CPDFSDK_Annot;
18 class CPDFSDK_Document; 18 class CPDFSDK_Document;
19 class CPDF_Bookmark; 19 class CPDF_Bookmark;
20 class CPDF_Dictionary; 20 class CPDF_Dictionary;
21 21
22 class CPDFSDK_FormActionHandler { 22 class CPDFSDK_FormActionHandler {
23 public: 23 public:
24 FX_BOOL DoAction_Hide(const CPDF_Action& action, CPDFSDK_Document* pDocument); 24 FX_BOOL DoAction_Hide(const CPDF_Action& action, CPDFSDK_Document* pDocument);
25 FX_BOOL DoAction_SubmitForm(const CPDF_Action& action, 25 FX_BOOL DoAction_SubmitForm(const CPDF_Action& action,
26 CPDFSDK_Document* pDocument); 26 CPDFSDK_Document* pDocument);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 PDFSDK_FieldAction& data); 61 PDFSDK_FieldAction& data);
62 FX_BOOL DoAction_FieldJavaScript(const CPDF_Action& JsAction, 62 FX_BOOL DoAction_FieldJavaScript(const CPDF_Action& JsAction,
63 CPDF_AAction::AActionType type, 63 CPDF_AAction::AActionType type,
64 CPDFSDK_Document* pDocument, 64 CPDFSDK_Document* pDocument,
65 CPDF_FormField* pFormField, 65 CPDF_FormField* pFormField,
66 PDFSDK_FieldAction& data); 66 PDFSDK_FieldAction& data);
67 67
68 private: 68 private:
69 FX_BOOL ExecuteDocumentOpenAction(const CPDF_Action& action, 69 FX_BOOL ExecuteDocumentOpenAction(const CPDF_Action& action,
70 CPDFSDK_Document* pDocument, 70 CPDFSDK_Document* pDocument,
71 CFX_PtrList& list); 71 std::set<CPDF_Dictionary*>* visited);
72 FX_BOOL ExecuteDocumentPageAction(const CPDF_Action& action, 72 FX_BOOL ExecuteDocumentPageAction(const CPDF_Action& action,
73 CPDF_AAction::AActionType type, 73 CPDF_AAction::AActionType type,
74 CPDFSDK_Document* pDocument, 74 CPDFSDK_Document* pDocument,
75 CFX_PtrList& list); 75 std::set<CPDF_Dictionary*>* visited);
76 FX_BOOL ExecuteFieldAction(const CPDF_Action& action, 76 FX_BOOL ExecuteFieldAction(const CPDF_Action& action,
77 CPDF_AAction::AActionType type, 77 CPDF_AAction::AActionType type,
78 CPDFSDK_Document* pDocument, 78 CPDFSDK_Document* pDocument,
79 CPDF_FormField* pFormField, 79 CPDF_FormField* pFormField,
80 PDFSDK_FieldAction& data, 80 PDFSDK_FieldAction& data,
81 CFX_PtrList& list); 81 std::set<CPDF_Dictionary*>* visited);
82 FX_BOOL ExecuteScreenAction(const CPDF_Action& action, 82 FX_BOOL ExecuteScreenAction(const CPDF_Action& action,
83 CPDF_AAction::AActionType type, 83 CPDF_AAction::AActionType type,
84 CPDFSDK_Document* pDocument, 84 CPDFSDK_Document* pDocument,
85 CPDFSDK_Annot* pScreen, 85 CPDFSDK_Annot* pScreen,
86 CFX_PtrList& list); 86 std::set<CPDF_Dictionary*>* visited);
87 FX_BOOL ExecuteBookMark(const CPDF_Action& action, 87 FX_BOOL ExecuteBookMark(const CPDF_Action& action,
88 CPDFSDK_Document* pDocument, 88 CPDFSDK_Document* pDocument,
89 CPDF_Bookmark* pBookmark, 89 CPDF_Bookmark* pBookmark,
90 CFX_PtrList& list); 90 std::set<CPDF_Dictionary*>* visited);
91 FX_BOOL ExecuteLinkAction(const CPDF_Action& action, 91 FX_BOOL ExecuteLinkAction(const CPDF_Action& action,
92 CPDFSDK_Document* pDocument, 92 CPDFSDK_Document* pDocument,
93 CFX_PtrList& list); 93 std::set<CPDF_Dictionary*>* visited);
94 94
95 void DoAction_NoJs(const CPDF_Action& action, CPDFSDK_Document* pDocument); 95 void DoAction_NoJs(const CPDF_Action& action, CPDFSDK_Document* pDocument);
96 void RunDocumentPageJavaScript(CPDFSDK_Document* pDocument, 96 void RunDocumentPageJavaScript(CPDFSDK_Document* pDocument,
97 CPDF_AAction::AActionType type, 97 CPDF_AAction::AActionType type,
98 const CFX_WideString& script); 98 const CFX_WideString& script);
99 void RunDocumentOpenJavaScript(CPDFSDK_Document* pDocument, 99 void RunDocumentOpenJavaScript(CPDFSDK_Document* pDocument,
100 const CFX_WideString& sScriptName, 100 const CFX_WideString& sScriptName,
101 const CFX_WideString& script); 101 const CFX_WideString& script);
102 void RunFieldJavaScript(CPDFSDK_Document* pDocument, 102 void RunFieldJavaScript(CPDFSDK_Document* pDocument,
103 CPDF_FormField* pFormField, 103 CPDF_FormField* pFormField,
(...skipping 10 matching lines...) Expand all
114 void DoAction_Launch(CPDFSDK_Document* pDocument, const CPDF_Action& action); 114 void DoAction_Launch(CPDFSDK_Document* pDocument, const CPDF_Action& action);
115 void DoAction_URI(CPDFSDK_Document* pDocument, const CPDF_Action& action); 115 void DoAction_URI(CPDFSDK_Document* pDocument, const CPDF_Action& action);
116 void DoAction_Named(CPDFSDK_Document* pDocument, const CPDF_Action& action); 116 void DoAction_Named(CPDFSDK_Document* pDocument, const CPDF_Action& action);
117 void DoAction_SetOCGState(CPDFSDK_Document* pDocument, 117 void DoAction_SetOCGState(CPDFSDK_Document* pDocument,
118 const CPDF_Action& action); 118 const CPDF_Action& action);
119 119
120 std::unique_ptr<CPDFSDK_FormActionHandler> m_pFormActionHandler; 120 std::unique_ptr<CPDFSDK_FormActionHandler> m_pFormActionHandler;
121 }; 121 };
122 122
123 #endif // FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_ 123 #endif // FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/src/fsdk_actionhandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698