| OLD | NEW |
| 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 FPDFSDK_SRC_JAVASCRIPT_JS_DEFINE_H_ | 7 #ifndef FPDFSDK_SRC_JAVASCRIPT_JS_DEFINE_H_ |
| 8 #define FPDFSDK_SRC_JAVASCRIPT_JS_DEFINE_H_ | 8 #define FPDFSDK_SRC_JAVASCRIPT_JS_DEFINE_H_ |
| 9 | 9 |
| 10 #include <vector> |
| 11 |
| 10 #include "fpdfsdk/include/jsapi/fxjs_v8.h" | 12 #include "fpdfsdk/include/jsapi/fxjs_v8.h" |
| 11 #include "fpdfsdk/src/javascript/JS_Object.h" | 13 #include "fpdfsdk/src/javascript/JS_Object.h" |
| 12 #include "fpdfsdk/src/javascript/JS_Value.h" | 14 #include "fpdfsdk/src/javascript/JS_Value.h" |
| 13 #include "fpdfsdk/src/javascript/resource.h" | 15 #include "fpdfsdk/src/javascript/resource.h" |
| 14 | 16 |
| 15 struct JSConstSpec { | 17 struct JSConstSpec { |
| 16 const wchar_t* pName; | 18 const wchar_t* pName; |
| 17 double number; | 19 double number; |
| 18 const wchar_t* string; | 20 const wchar_t* string; // NOLINT |
| 19 uint8_t t; // 0:double 1:str | 21 uint8_t t; // 0:double 1:str |
| 20 }; | 22 }; |
| 21 | 23 |
| 22 struct JSPropertySpec { | 24 struct JSPropertySpec { |
| 23 const wchar_t* pName; | 25 const wchar_t* pName; |
| 24 v8::AccessorGetterCallback pPropGet; | 26 v8::AccessorGetterCallback pPropGet; |
| 25 v8::AccessorSetterCallback pPropPut; | 27 v8::AccessorSetterCallback pPropPut; |
| 26 }; | 28 }; |
| 27 | 29 |
| 28 struct JSMethodSpec { | 30 struct JSMethodSpec { |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 for (size_t i = 0; i < FX_ArraySize(global_methods) - 1; ++i) { \ | 484 for (size_t i = 0; i < FX_ArraySize(global_methods) - 1; ++i) { \ |
| 483 FXJS_DefineGlobalMethod(pIsolate, \ | 485 FXJS_DefineGlobalMethod(pIsolate, \ |
| 484 js_class_name::global_methods[i].pName, \ | 486 js_class_name::global_methods[i].pName, \ |
| 485 js_class_name::global_methods[i].pMethodCall); \ | 487 js_class_name::global_methods[i].pMethodCall); \ |
| 486 } \ | 488 } \ |
| 487 } | 489 } |
| 488 | 490 |
| 489 CJS_Value::Type GET_VALUE_TYPE(v8::Local<v8::Value> p); | 491 CJS_Value::Type GET_VALUE_TYPE(v8::Local<v8::Value> p); |
| 490 | 492 |
| 491 #endif // FPDFSDK_SRC_JAVASCRIPT_JS_DEFINE_H_ | 493 #endif // FPDFSDK_SRC_JAVASCRIPT_JS_DEFINE_H_ |
| OLD | NEW |