| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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 FXJS_CFXJSE_ARGUMENTS_H_ | 7 #ifndef FXJS_CFXJSE_ARGUMENTS_H_ |
| 8 #define FXJS_CFXJSE_ARGUMENTS_H_ | 8 #define FXJS_CFXJSE_ARGUMENTS_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "fxjs/fxjse.h" | 12 #include "fxjs/fxjse.h" |
| 13 | 13 |
| 14 class CFXJSE_Class; | 14 class CFXJSE_Class; |
| 15 | 15 |
| 16 class CFXJSE_Arguments { | 16 class CFXJSE_Arguments { |
| 17 public: | 17 public: |
| 18 CFXJSE_Arguments(const v8::FunctionCallbackInfo<v8::Value>* pInfo, | 18 CFXJSE_Arguments(const v8::FunctionCallbackInfo<v8::Value>* pInfo, |
| 19 CFXJSE_Value* pRetValue) | 19 CFXJSE_Value* pRetValue) |
| 20 : m_pInfo(pInfo), m_pRetValue(pRetValue) {} | 20 : m_pInfo(pInfo), m_pRetValue(pRetValue) {} |
| 21 | 21 |
| 22 v8::Isolate* GetRuntime() const; | 22 v8::Isolate* GetRuntime() const; |
| 23 int32_t GetLength() const; | 23 int32_t GetLength() const; |
| 24 std::unique_ptr<CFXJSE_Value> GetValue(int32_t index) const; | 24 std::unique_ptr<CFXJSE_Value> GetValue(int32_t index) const; |
| 25 FX_BOOL GetBoolean(int32_t index) const; | 25 bool GetBoolean(int32_t index) const; |
| 26 int32_t GetInt32(int32_t index) const; | 26 int32_t GetInt32(int32_t index) const; |
| 27 FX_FLOAT GetFloat(int32_t index) const; | 27 FX_FLOAT GetFloat(int32_t index) const; |
| 28 CFX_ByteString GetUTF8String(int32_t index) const; | 28 CFX_ByteString GetUTF8String(int32_t index) const; |
| 29 CFXJSE_HostObject* GetObject(int32_t index, | 29 CFXJSE_HostObject* GetObject(int32_t index, |
| 30 CFXJSE_Class* pClass = nullptr) const; | 30 CFXJSE_Class* pClass = nullptr) const; |
| 31 CFXJSE_Value* GetReturnValue(); | 31 CFXJSE_Value* GetReturnValue(); |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 const v8::FunctionCallbackInfo<v8::Value>* m_pInfo; | 34 const v8::FunctionCallbackInfo<v8::Value>* m_pInfo; |
| 35 CFXJSE_Value* m_pRetValue; | 35 CFXJSE_Value* m_pRetValue; |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 #endif // FXJS_CFXJSE_ARGUMENTS_H_ | 38 #endif // FXJS_CFXJSE_ARGUMENTS_H_ |
| OLD | NEW |