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

Unified Diff: fpdfsdk/include/javascript/JS_Value.h

Issue 1347833002: Ensure functions in FXJS_V8 are prefixed by FXJS_. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, nits, format. Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/include/javascript/JS_Runtime.h ('k') | fpdfsdk/include/jsapi/fxjs_v8.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/include/javascript/JS_Value.h
diff --git a/fpdfsdk/include/javascript/JS_Value.h b/fpdfsdk/include/javascript/JS_Value.h
index 771214d968b2577f7c2731fa00535ec004afd26c..384e772572d2fc9a471325a718472193525d859b 100644
--- a/fpdfsdk/include/javascript/JS_Value.h
+++ b/fpdfsdk/include/javascript/JS_Value.h
@@ -17,8 +17,20 @@ class CJS_Object;
class CJS_Value {
public:
+ enum Type {
+ VT_unknown,
+ VT_string,
+ VT_number,
+ VT_boolean,
+ VT_date,
+ VT_object,
+ VT_fxobject,
+ VT_null,
+ VT_undefined
+ };
+
CJS_Value(v8::Isolate* isolate);
- CJS_Value(v8::Isolate* isolate, v8::Local<v8::Value> pValue, FXJSVALUETYPE t);
+ CJS_Value(v8::Isolate* isolate, v8::Local<v8::Value> pValue, Type t);
CJS_Value(v8::Isolate* isolate, const int& iValue);
CJS_Value(v8::Isolate* isolate, const double& dValue);
CJS_Value(v8::Isolate* isolate, const float& fValue);
@@ -33,10 +45,11 @@ class CJS_Value {
~CJS_Value();
void SetNull();
- void Attach(v8::Local<v8::Value> pValue, FXJSVALUETYPE t);
+ void Attach(v8::Local<v8::Value> pValue, Type t);
void Attach(CJS_Value* pValue);
void Detach();
+ Type GetType() const;
int ToInt() const;
bool ToBool() const;
double ToDouble() const;
@@ -63,16 +76,14 @@ class CJS_Value {
FX_BOOL IsArrayObject() const;
FX_BOOL IsDateObject() const;
- FXJSVALUETYPE GetType() const;
-
FX_BOOL ConvertToArray(CJS_Array&) const;
FX_BOOL ConvertToDate(CJS_Date&) const;
v8::Isolate* GetIsolate() { return m_isolate; }
protected:
+ Type m_eType;
v8::Local<v8::Value> m_pValue;
- FXJSVALUETYPE m_eType;
v8::Isolate* m_isolate;
};
@@ -190,4 +201,18 @@ class CJS_Date {
v8::Isolate* m_isolate;
};
+double JS_GetDateTime();
+int JS_GetYearFromTime(double dt);
+int JS_GetMonthFromTime(double dt);
+int JS_GetDayFromTime(double dt);
+int JS_GetHourFromTime(double dt);
+int JS_GetMinFromTime(double dt);
+int JS_GetSecFromTime(double dt);
+double JS_DateParse(const wchar_t* string);
+double JS_MakeDay(int nYear, int nMonth, int nDay);
+double JS_MakeTime(int nHour, int nMin, int nSec, int nMs);
+double JS_MakeDate(double day, double time);
+bool JS_PortIsNan(double d);
+double JS_LocalTime(double d);
+
#endif // FPDFSDK_INCLUDE_JAVASCRIPT_JS_VALUE_H_
« no previous file with comments | « fpdfsdk/include/javascript/JS_Runtime.h ('k') | fpdfsdk/include/jsapi/fxjs_v8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698