1 // Copyright 2014 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #include "fxjs/cjs_report.h" 8 9 #include <vector> 10 11 #include "fxjs/JS_Define.h" 12 #include "fxjs/cjs_object.h" 13 14 const JSMethodSpec CJS_Report::MethodSpecs[] = { 15 {"save", save_static}, 16 {"writeText", writeText_static}}; 17 18 int CJS_Report::ObjDefnID = -1; 19 20 // static 21 void CJS_Report::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) { 22 ObjDefnID = 23 pEngine->DefineObj("Report", eObjType, JSConstructor<CJS_Report, Report>, 24 JSDestructor<CJS_Report>); 25 DefineMethods(pEngine, ObjDefnID, MethodSpecs, FX_ArraySize(MethodSpecs)); 26 } 27 28 Report::Report(CJS_Object* pJSObject) : CJS_EmbedObj(pJSObject) {} 29 30 Report::~Report() {} 31 32 CJS_Return Report::writeText(CJS_Runtime* pRuntime, 33 const std::vector<v8::Local<v8::Value>>& params) { 34 // Unsafe, not supported. 35 return CJS_Return(true); 36 } 37 38 CJS_Return Report::save(CJS_Runtime* pRuntime, 39 const std::vector<v8::Local<v8::Value>>& params) { 40 // Unsafe, not supported. 41 return CJS_Return(true); 42 } 43