John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 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. |
Tom Sepez | c6ab172 | 2015-02-05 15:27:25 -0800 | [diff] [blame] | 4 | |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 5 | // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | |
| 7 | #include "../../include/javascript/JavaScript.h" |
| 8 | #include "../../include/javascript/IJavaScript.h" |
| 9 | #include "../../include/javascript/JS_Define.h" |
| 10 | #include "../../include/javascript/JS_Object.h" |
| 11 | #include "../../include/javascript/JS_Value.h" |
| 12 | #include "../../include/javascript/report.h" |
| 13 | |
| 14 | /* ---------------------- report ---------------------- */ |
| 15 | |
| 16 | BEGIN_JS_STATIC_CONST(CJS_Report) |
| 17 | END_JS_STATIC_CONST() |
| 18 | |
| 19 | BEGIN_JS_STATIC_PROP(CJS_Report) |
| 20 | END_JS_STATIC_PROP() |
| 21 | |
Tom Sepez | c6ab172 | 2015-02-05 15:27:25 -0800 | [diff] [blame] | 22 | BEGIN_JS_STATIC_METHOD(CJS_Report) |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 23 | JS_STATIC_METHOD_ENTRY(save) |
| 24 | JS_STATIC_METHOD_ENTRY(writeText) |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 25 | END_JS_STATIC_METHOD() |
| 26 | |
| 27 | IMPLEMENT_JS_CLASS(CJS_Report, Report) |
Tom Sepez | c6ab172 | 2015-02-05 15:27:25 -0800 | [diff] [blame] | 28 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 29 | Report::Report(CJS_Object* pJSObject) : CJS_EmbedObj(pJSObject) {} |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 30 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 31 | Report::~Report() {} |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 32 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 33 | FX_BOOL Report::writeText(IFXJS_Context* cc, |
| 34 | const CJS_Parameters& params, |
| 35 | CJS_Value& vRet, |
| 36 | CFX_WideString& sError) { |
Tom Sepez | c6ab172 | 2015-02-05 15:27:25 -0800 | [diff] [blame] | 37 | // Unsafe, not supported. |
| 38 | return TRUE; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 39 | } |
| 40 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 41 | FX_BOOL Report::save(IFXJS_Context* cc, |
| 42 | const CJS_Parameters& params, |
| 43 | CJS_Value& vRet, |
| 44 | CFX_WideString& sError) { |
Tom Sepez | c6ab172 | 2015-02-05 15:27:25 -0800 | [diff] [blame] | 45 | // Unsafe, not supported. |
| 46 | return TRUE; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 47 | } |