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

Side by Side Diff: fpdfsdk/include/jsapi/fxjs_v8.h

Issue 963193003: Return error information from pdfium to JS. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Typedefs Created 5 years, 9 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 | « fpdfsdk/include/javascript/resource.h ('k') | fpdfsdk/src/javascript/Document.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 FXJSAPI_H 7 #ifndef FXJSAPI_H
8 #define FXJSAPI_H 8 #define FXJSAPI_H
9 9
10 #include <v8.h> 10 #include <v8.h>
11 #include "../../core/include/fxcrt/fx_string.h" // For CFX_WideString
11 12
12 enum FXJSOBJTYPE 13 enum FXJSOBJTYPE
13 { 14 {
14 JS_DYNAMIC = 0, 15 JS_DYNAMIC = 0,
15 JS_STATIC = 1, 16 JS_STATIC = 1,
16 }; 17 };
17 18
18 enum FXJSVALUETYPE 19 enum FXJSVALUETYPE
19 { 20 {
20 VT_unknown, 21 VT_unknown,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void JS_Release(); 60 void JS_Release();
60 int JS_Parse(IJS_Run time* pJSRuntime, IFXJS_Context* pJSContext, const wchar_t* script, long length, FXJSErr* perror); 61 int JS_Parse(IJS_Run time* pJSRuntime, IFXJS_Context* pJSContext, const wchar_t* script, long length, FXJSErr* perror);
61 int JS_Execute(IJS_R untime* pJSRuntime, IFXJS_Context* pJSContext, const wchar_t* script, long lengt h, FXJSErr* perror); 62 int JS_Execute(IJS_R untime* pJSRuntime, IFXJS_Context* pJSContext, const wchar_t* script, long lengt h, FXJSErr* perror);
62 v8::Handle<v8::Object> JS_NewFxDynamicObj(IJS_Runtime* pJSRunti me, IFXJS_Context* pJSContext, int nObjDefnID); 63 v8::Handle<v8::Object> JS_NewFxDynamicObj(IJS_Runtime* pJSRunti me, IFXJS_Context* pJSContext, int nObjDefnID);
63 v8::Handle<v8::Object> JS_GetStaticObj(IJS_Runtime* pJSRuntime, int nObjDefnID); 64 v8::Handle<v8::Object> JS_GetStaticObj(IJS_Runtime* pJSRuntime, int nObjDefnID);
64 void JS_SetThisObj(IJS_Runtim e* pJSRuntime, int nThisObjID); 65 void JS_SetThisObj(IJS_Runtim e* pJSRuntime, int nThisObjID);
65 v8::Handle<v8::Object> JS_GetThisObj(IJS_Runtime * pJSRuntime); 66 v8::Handle<v8::Object> JS_GetThisObj(IJS_Runtime * pJSRuntime);
66 int JS_GetObjDefnID( v8::Handle<v8::Object> pObj); 67 int JS_GetObjDefnID( v8::Handle<v8::Object> pObj);
67 IJS_Runtime* JS_GetRuntime(v8::Handle<v8::Obj ect> pObj); 68 IJS_Runtime* JS_GetRuntime(v8::Handle<v8::Obj ect> pObj);
68 int JS_GetObjDefnID( IJS_Runtime * pJSRuntime, const wchar_t* pObjName); 69 int JS_GetObjDefnID( IJS_Runtime * pJSRuntime, const wchar_t* pObjName);
69 void» » » » » » » JS_Error(v8::Value * pEr ror,const wchar_t * main,const wchar_t * sub); 70 void» » » » » » » JS_Error(v8::Isolate* is olate, const CFX_WideString& message);
70 unsigned JS_CalcHash(const wchar_ t* main, unsigned nLen); 71 unsigned JS_CalcHash(const wchar_ t* main, unsigned nLen);
71 unsigned JS_CalcHash(const wchar_ t* main); 72 unsigned JS_CalcHash(const wchar_ t* main);
72 const wchar_t* JS_GetTypeof(v8::Handle<v8::Valu e> pObj); 73 const wchar_t* JS_GetTypeof(v8::Handle<v8::Valu e> pObj);
73 const wchar_t* JS_GetClassname(v8::Handle<v8::O bject> pObj);
74 void JS_SetPrivate(IJS_Runtim e* pJSRuntime, v8::Handle<v8::Object> pObj, void* p); 74 void JS_SetPrivate(IJS_Runtim e* pJSRuntime, v8::Handle<v8::Object> pObj, void* p);
75 void* JS_GetPrivate(IJS_Runtim e* pJSRuntime, v8::Handle<v8::Object> pObj); 75 void* JS_GetPrivate(IJS_Runtim e* pJSRuntime, v8::Handle<v8::Object> pObj);
76 void JS_SetPrivate(v8::Handle <v8::Object> pObj, void* p); 76 void JS_SetPrivate(v8::Handle <v8::Object> pObj, void* p);
77 void* JS_GetPrivate(v8::Handle <v8::Object> pObj); 77 void* JS_GetPrivate(v8::Handle <v8::Object> pObj);
78 void JS_FreePrivate(v8::Handl e<v8::Object> pObj); 78 void JS_FreePrivate(v8::Handl e<v8::Object> pObj);
79 v8::Handle<v8::Value> JS_GetObjectValue(v8::Handle<v8::Object> pObj); 79 v8::Handle<v8::Value> JS_GetObjectValue(v8::Handle<v8::Object> pObj);
80 v8::Handle<v8::Value> JS_GetObjectElement(IJS_Runtime* pJSRunt ime, v8::Handle<v8::Object> pObj,const wchar_t* PropertyName); 80 v8::Handle<v8::Value> JS_GetObjectElement(IJS_Runtime* pJSRunt ime, v8::Handle<v8::Object> pObj,const wchar_t* PropertyName);
81 v8::Handle<v8::Array> JS_GetObjectElementNames(v8::Handle<v8:: Object> pObj); 81 v8::Handle<v8::Array> JS_GetObjectElementNames(v8::Handle<v8:: Object> pObj);
82 void JS_PutObjectString(IJS_R untime* pJSRuntime,v8::Handle<v8::Object> pObj, const wchar_t* PropertyName, con st wchar_t* sValue); 82 void JS_PutObjectString(IJS_R untime* pJSRuntime,v8::Handle<v8::Object> pObj, const wchar_t* PropertyName, con st wchar_t* sValue);
83 void JS_PutObjectNumber(IJS_R untime* pJSRuntime,v8::Handle<v8::Object> pObj, const wchar_t* PropertyName, int nValue); 83 void JS_PutObjectNumber(IJS_R untime* pJSRuntime,v8::Handle<v8::Object> pObj, const wchar_t* PropertyName, int nValue);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 int JS_GetMinFromTim e(double dt); 122 int JS_GetMinFromTim e(double dt);
123 int JS_GetSecFromTim e(double dt); 123 int JS_GetSecFromTim e(double dt);
124 double JS_DateParse(const wchar _t* string); 124 double JS_DateParse(const wchar _t* string);
125 double JS_MakeDay(int nYear, in t nMonth, int nDay); 125 double JS_MakeDay(int nYear, in t nMonth, int nDay);
126 double JS_MakeTime(int nHour, i nt nMin, int nSec, int nMs); 126 double JS_MakeTime(int nHour, i nt nMin, int nSec, int nMs);
127 double JS_MakeDate(double day, double time); 127 double JS_MakeDate(double day, double time);
128 bool JS_PortIsNan(double d); 128 bool JS_PortIsNan(double d);
129 double JS_LocalTime(double d); 129 double JS_LocalTime(double d);
130 130
131 #endif //FXJSAPI_H 131 #endif //FXJSAPI_H
OLDNEW
« no previous file with comments | « fpdfsdk/include/javascript/resource.h ('k') | fpdfsdk/src/javascript/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698