Dan Sinclair | 3de090d | 2017-10-30 19:18:54 +0000 | [diff] [blame] | 1 | // Copyright 2017 PDFium Authors. All rights reserved. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
Tom Sepez | 2b0ed94 | 2015-02-27 13:58:29 -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 | |
Dan Sinclair | e0345a4 | 2017-10-30 20:20:42 +0000 | [diff] [blame] | 7 | #ifndef FXJS_JS_RESOURCES_H_ |
| 8 | #define FXJS_JS_RESOURCES_H_ |
Tom Sepez | 2b0ed94 | 2015-02-27 13:58:29 -0800 | [diff] [blame] | 9 | |
Dan Sinclair | 3de090d | 2017-10-30 19:18:54 +0000 | [diff] [blame] | 10 | #include "core/fxcrt/widestring.h" |
Tom Sepez | 2b0ed94 | 2015-02-27 13:58:29 -0800 | [diff] [blame] | 11 | |
Dan Sinclair | d6e9cfa | 2017-10-30 21:19:42 +0000 | [diff] [blame] | 12 | enum class JSMessage { |
Tom Sepez | f52fb70 | 2018-10-23 20:37:13 +0000 | [diff] [blame] | 13 | kAlert = 1, |
Dan Sinclair | d6e9cfa | 2017-10-30 21:19:42 +0000 | [diff] [blame] | 14 | kParamError, |
| 15 | kInvalidInputError, |
| 16 | kParamTooLongError, |
| 17 | kParseDateError, |
| 18 | kRangeBetweenError, |
| 19 | kRangeGreaterError, |
| 20 | kRangeLessError, |
| 21 | kNotSupportedError, |
| 22 | kBusyError, |
| 23 | kDuplicateEventError, |
| 24 | kSecondParamNotDateError, |
| 25 | kSecondParamInvalidDateError, |
| 26 | kGlobalNotFoundError, |
| 27 | kReadOnlyError, |
| 28 | kTypeError, |
| 29 | kValueError, |
| 30 | kPermissionError, |
Dan Sinclair | cb22f9a | 2017-12-11 22:01:08 +0000 | [diff] [blame] | 31 | kBadObjectError, |
Tom Sepez | 1699982 | 2018-06-08 18:23:05 +0000 | [diff] [blame] | 32 | kObjectTypeError, |
Tom Sepez | 1699982 | 2018-06-08 18:23:05 +0000 | [diff] [blame] | 33 | kUnknownProperty, |
Lei Zhang | 058e2aa | 2018-11-09 23:49:50 +0000 | [diff] [blame] | 34 | kInvalidSetError, |
Tom Sepez | 83a2cd0 | 2019-02-14 01:28:39 +0000 | [diff] [blame] | 35 | kUserGestureRequiredError, |
Tom Sepez | f888579 | 2018-10-30 19:02:50 +0000 | [diff] [blame] | 36 | kTooManyOccurances, |
Tom Sepez | 1699982 | 2018-06-08 18:23:05 +0000 | [diff] [blame] | 37 | kUnknownMethod, |
Dan Sinclair | d6e9cfa | 2017-10-30 21:19:42 +0000 | [diff] [blame] | 38 | }; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 39 | |
Dan Sinclair | d6e9cfa | 2017-10-30 21:19:42 +0000 | [diff] [blame] | 40 | WideString JSGetStringFromID(JSMessage msg); |
Ryan Harrison | 275e260 | 2017-09-18 14:23:18 -0400 | [diff] [blame] | 41 | WideString JSFormatErrorString(const char* class_name, |
| 42 | const char* property_name, |
| 43 | const WideString& details); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 44 | |
Dan Sinclair | e0345a4 | 2017-10-30 20:20:42 +0000 | [diff] [blame] | 45 | #endif // FXJS_JS_RESOURCES_H_ |