diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-09-08 16:34:37 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-09-08 16:34:37 -0700 |
commit | d6278baea3dec46fec555f7740bde9087e57d8f1 (patch) | |
tree | 159611ab5f63ff7ccdc493a7461cc9c784d2c4c3 /fpdfsdk | |
parent | 96675b148c8961242e2e1f91a300fd9b15068bdf (diff) | |
download | pdfium-d6278baea3dec46fec555f7740bde9087e57d8f1.tar.xz |
Merge to XFA: Beef up app_props.in and tidy app.cpp.
Small manual edit in fpdfsdk/src/javascript/app.cpp
(cherry picked from commit b830fbc03a6d12d8b5be50e85499c281a4c5da7f)
Original Review URL: https://codereview.chromium.org/1317393003 .
R=thestig@chromium.org
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1302423008 .
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/src/javascript/app.cpp | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/fpdfsdk/src/javascript/app.cpp b/fpdfsdk/src/javascript/app.cpp index c8815a0ca1..4815e4729c 100644 --- a/fpdfsdk/src/javascript/app.cpp +++ b/fpdfsdk/src/javascript/app.cpp @@ -18,16 +18,10 @@ static v8::Isolate* GetIsolate(IFXJS_Context* cc) { CJS_Context* pContext = (CJS_Context*)cc; - ASSERT(pContext != NULL); - CJS_Runtime* pRuntime = pContext->GetJSRuntime(); - ASSERT(pRuntime != NULL); - return pRuntime->GetIsolate(); } -/* ---------------------------- TimerObj ---------------------------- */ - BEGIN_JS_STATIC_CONST(CJS_TimerObj) END_JS_STATIC_CONST() @@ -52,19 +46,14 @@ CJS_Timer* TimerObj::GetTimer() const { return m_pTimer; } -#define JS_STR_VIEWERTYPE_READER L"Reader" -#define JS_STR_VIEWERTYPE_STANDARD L"Exchange" +#define JS_STR_VIEWERTYPE L"pdfium" #define JS_STR_VIEWERVARIATION L"Full" #define JS_STR_PLATFORM L"WIN" #define JS_STR_LANGUANGE L"ENU" -#define JS_STR_VIEWERVERSION 8 -#define JS_STR_VIEWERVERSION_XFA 11 +#define JS_NUM_VIEWERVERSION 8 +#define JS_NUM_VIEWERVERSION_XFA 11 #define JS_NUM_FORMSVERSION 7 -#define JS_FILEPATH_MAXLEN 2000 - -/* ---------------------------- app ---------------------------- */ - BEGIN_JS_STATIC_CONST(CJS_App) END_JS_STATIC_CONST() @@ -188,7 +177,7 @@ FX_BOOL app::viewerType(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { if (vp.IsGetting()) { - vp << L"pdfium"; + vp << JS_STR_VIEWERTYPE; return TRUE; } @@ -216,9 +205,9 @@ FX_BOOL app::viewerVersion(IFXJS_Context* cc, CPDFSDK_Document* pCurDoc = pContext->GetReaderDocument(); CPDFXFA_Document* pDoc = pCurDoc->GetDocument(); if (pDoc->GetDocType() == 1 || pDoc->GetDocType() == 2) - vp << JS_STR_VIEWERVERSION_XFA; + vp << JS_NUM_VIEWERVERSION_XFA; else - vp << JS_STR_VIEWERVERSION; + vp << JS_NUM_VIEWERVERSION; return TRUE; } |