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

Side by Side Diff: fpdfsdk/src/javascript/app.cpp

Issue 1484843002: Tidy ifdefs in fpdfsdk. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Fix initialization error warning. Created 5 years 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 | « fpdfsdk/src/javascript/JS_Runtime_Stub.cpp ('k') | fpdfsdk/src/jsapi/fxjs_v8.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 #include "app.h" 7 #include "app.h"
8 8
9 #include "Document.h" 9 #include "Document.h"
10 #include "JS_Context.h" 10 #include "JS_Context.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 return m_pTimer; 42 return m_pTimer;
43 } 43 }
44 44
45 #define JS_STR_VIEWERTYPE L"pdfium" 45 #define JS_STR_VIEWERTYPE L"pdfium"
46 #define JS_STR_VIEWERVARIATION L"Full" 46 #define JS_STR_VIEWERVARIATION L"Full"
47 #define JS_STR_PLATFORM L"WIN" 47 #define JS_STR_PLATFORM L"WIN"
48 #define JS_STR_LANGUANGE L"ENU" 48 #define JS_STR_LANGUANGE L"ENU"
49 #define JS_NUM_VIEWERVERSION 8 49 #define JS_NUM_VIEWERVERSION 8
50 #ifdef PDF_ENABLE_XFA 50 #ifdef PDF_ENABLE_XFA
51 #define JS_NUM_VIEWERVERSION_XFA 11 51 #define JS_NUM_VIEWERVERSION_XFA 11
52 #endif 52 #endif // PDF_ENABLE_XFA
53 #define JS_NUM_FORMSVERSION 7 53 #define JS_NUM_FORMSVERSION 7
54 54
55 BEGIN_JS_STATIC_CONST(CJS_App) 55 BEGIN_JS_STATIC_CONST(CJS_App)
56 END_JS_STATIC_CONST() 56 END_JS_STATIC_CONST()
57 57
58 BEGIN_JS_STATIC_PROP(CJS_App) 58 BEGIN_JS_STATIC_PROP(CJS_App)
59 JS_STATIC_PROP_ENTRY(activeDocs) 59 JS_STATIC_PROP_ENTRY(activeDocs)
60 JS_STATIC_PROP_ENTRY(calculate) 60 JS_STATIC_PROP_ENTRY(calculate)
61 JS_STATIC_PROP_ENTRY(formsVersion) 61 JS_STATIC_PROP_ENTRY(formsVersion)
62 JS_STATIC_PROP_ENTRY(fs) 62 JS_STATIC_PROP_ENTRY(fs)
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 return FALSE; 201 return FALSE;
202 202
203 #ifdef PDF_ENABLE_XFA 203 #ifdef PDF_ENABLE_XFA
204 CJS_Context* pContext = (CJS_Context*)cc; 204 CJS_Context* pContext = (CJS_Context*)cc;
205 CPDFSDK_Document* pCurDoc = pContext->GetReaderDocument(); 205 CPDFSDK_Document* pCurDoc = pContext->GetReaderDocument();
206 CPDFXFA_Document* pDoc = pCurDoc->GetXFADocument(); 206 CPDFXFA_Document* pDoc = pCurDoc->GetXFADocument();
207 if (pDoc->GetDocType() == 1 || pDoc->GetDocType() == 2) { 207 if (pDoc->GetDocType() == 1 || pDoc->GetDocType() == 2) {
208 vp << JS_NUM_VIEWERVERSION_XFA; 208 vp << JS_NUM_VIEWERVERSION_XFA;
209 return TRUE; 209 return TRUE;
210 } 210 }
211 #endif // PDF_ENABLE_XFA
211 212
212 #endif
213 vp << JS_NUM_VIEWERVERSION; 213 vp << JS_NUM_VIEWERVERSION;
214 return TRUE; 214 return TRUE;
215 } 215 }
216 216
217 FX_BOOL app::platform(IJS_Context* cc, 217 FX_BOOL app::platform(IJS_Context* cc,
218 CJS_PropValue& vp, 218 CJS_PropValue& vp,
219 CFX_WideString& sError) { 219 CFX_WideString& sError) {
220 if (vp.IsGetting()) { 220 if (vp.IsGetting()) {
221 vp << JS_STR_PLATFORM; 221 vp << JS_STR_PLATFORM;
222 return TRUE; 222 return TRUE;
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 FX_BOOL app::media(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { 814 FX_BOOL app::media(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) {
815 return FALSE; 815 return FALSE;
816 } 816 }
817 817
818 FX_BOOL app::execDialog(IJS_Context* cc, 818 FX_BOOL app::execDialog(IJS_Context* cc,
819 const std::vector<CJS_Value>& params, 819 const std::vector<CJS_Value>& params,
820 CJS_Value& vRet, 820 CJS_Value& vRet,
821 CFX_WideString& sError) { 821 CFX_WideString& sError) {
822 return TRUE; 822 return TRUE;
823 } 823 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/javascript/JS_Runtime_Stub.cpp ('k') | fpdfsdk/src/jsapi/fxjs_v8.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698