blob: 8a308628847a818cbb92fcd7155843e942938a50 [file] [log] [blame]
Dan Sinclair3de090d2017-10-30 19:18:54 +00001// Copyright 2017 PDFium Authors. All rights reserved.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
Tom Sepez2b0ed942015-02-27 13:58:29 -08004
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07005// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
Dan Sinclaire0345a42017-10-30 20:20:42 +00007#ifndef FXJS_JS_RESOURCES_H_
8#define FXJS_JS_RESOURCES_H_
Tom Sepez2b0ed942015-02-27 13:58:29 -08009
Dan Sinclair3de090d2017-10-30 19:18:54 +000010#include "core/fxcrt/widestring.h"
Tom Sepez2b0ed942015-02-27 13:58:29 -080011
Dan Sinclaird6e9cfa2017-10-30 21:19:42 +000012enum class JSMessage {
Tom Sepezf52fb702018-10-23 20:37:13 +000013 kAlert = 1,
Dan Sinclaird6e9cfa2017-10-30 21:19:42 +000014 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 Sinclaircb22f9a2017-12-11 22:01:08 +000031 kBadObjectError,
Tom Sepez16999822018-06-08 18:23:05 +000032 kObjectTypeError,
Tom Sepez16999822018-06-08 18:23:05 +000033 kUnknownProperty,
Lei Zhang058e2aa2018-11-09 23:49:50 +000034 kInvalidSetError,
Tom Sepez83a2cd02019-02-14 01:28:39 +000035 kUserGestureRequiredError,
Tom Sepezf8885792018-10-30 19:02:50 +000036 kTooManyOccurances,
Tom Sepez16999822018-06-08 18:23:05 +000037 kUnknownMethod,
Dan Sinclaird6e9cfa2017-10-30 21:19:42 +000038};
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070039
Dan Sinclaird6e9cfa2017-10-30 21:19:42 +000040WideString JSGetStringFromID(JSMessage msg);
Ryan Harrison275e2602017-09-18 14:23:18 -040041WideString JSFormatErrorString(const char* class_name,
42 const char* property_name,
43 const WideString& details);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070044
Dan Sinclaire0345a42017-10-30 20:20:42 +000045#endif // FXJS_JS_RESOURCES_H_