summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/JS_Value.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-30 17:05:31 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-10-30 17:05:31 +0000
commita146507fdbe8a8d13fe590b5fa883efc7bffe90a (patch)
treebacdd8e8ae0ac850df26cd834893936f647513c9 /fpdfsdk/javascript/JS_Value.h
parent5ce2d2e0c7899dc2d3b3ac6a25293894fea04183 (diff)
downloadpdfium-a146507fdbe8a8d13fe590b5fa883efc7bffe90a.tar.xz
Move JS_Value into JS_Define
This CL moves CJS_Return to its own files and moves the remaining function definitions from JS_Value to JS_Define. Change-Id: Ic7058a02330153f22d1fff9fc6cdebd9167c498b Reviewed-on: https://pdfium-review.googlesource.com/17038 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/javascript/JS_Value.h')
-rw-r--r--fpdfsdk/javascript/JS_Value.h65
1 files changed, 0 insertions, 65 deletions
diff --git a/fpdfsdk/javascript/JS_Value.h b/fpdfsdk/javascript/JS_Value.h
deleted file mode 100644
index 046d959e68..0000000000
--- a/fpdfsdk/javascript/JS_Value.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef FPDFSDK_JAVASCRIPT_JS_VALUE_H_
-#define FPDFSDK_JAVASCRIPT_JS_VALUE_H_
-
-#include <vector>
-
-#include "fxjs/fxjs_v8.h"
-
-class CJS_Document;
-class CJS_Object;
-class CJS_Runtime;
-
-class CJS_Return {
- public:
- explicit CJS_Return(bool);
- explicit CJS_Return(const WideString&);
- explicit CJS_Return(v8::Local<v8::Value>);
- CJS_Return(const CJS_Return&);
- ~CJS_Return();
-
- bool HasError() const { return is_error_; }
- WideString Error() const { return error_; }
-
- bool HasReturn() const { return !return_.IsEmpty(); }
- v8::Local<v8::Value> Return() const { return return_; }
-
- private:
- CJS_Return() = delete;
-
- bool is_error_ = false;
- WideString error_;
- v8::Local<v8::Value> return_;
-};
-
-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_LocalTime(double d);
-double JS_DateParse(const WideString& str);
-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);
-
-// Some JS methods have the bizarre convention that they may also be called
-// with a single argument which is an object containing the actual arguments
-// as its properties. The varying arguments to this method are the property
-// names as wchar_t string literals corresponding to each positional argument.
-// The result will always contain |nKeywords| value, with unspecified ones
-// being set to type VT_unknown.
-std::vector<v8::Local<v8::Value>> ExpandKeywordParams(
- CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& originals,
- size_t nKeywords,
- ...);
-
-#endif // FPDFSDK_JAVASCRIPT_JS_VALUE_H_