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 #include "../../include/javascript/JavaScript.h" | 7 #include "../../include/javascript/JavaScript.h" |
8 #include "../../include/javascript/IJavaScript.h" | 8 #include "../../include/javascript/IJavaScript.h" |
9 #include "../../include/javascript/JS_Define.h" | 9 #include "../../include/javascript/JS_Define.h" |
10 #include "../../include/javascript/JS_Object.h" | 10 #include "../../include/javascript/JS_Object.h" |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 return TRUE; | 473 return TRUE; |
474 } | 474 } |
475 | 475 |
476 FX_BOOL app::popUpMenuEx(OBJ_METHOD_PARAMS) | 476 FX_BOOL app::popUpMenuEx(OBJ_METHOD_PARAMS) |
477 { | 477 { |
478 return FALSE; | 478 return FALSE; |
479 } | 479 } |
480 | 480 |
481 FX_BOOL app::fs(OBJ_PROP_PARAMS) | 481 FX_BOOL app::fs(OBJ_PROP_PARAMS) |
482 { | 482 { |
483 #ifdef FOXIT_CHROME_BUILD | |
484 return FALSE; | 483 return FALSE; |
485 #else | |
486 CJS_Context* pContext = (CJS_Context*)cc; | |
487 ASSERT(pContext != NULL); | |
488 CJS_Runtime* pRuntime = pContext->GetJSRuntime(); | |
489 ASSERT(pRuntime != NULL); | |
490 | |
491 if (vp.IsGetting()) | |
492 { | |
493 return TRUE; | |
494 } | |
495 else | |
496 { | |
497 return TRUE; | |
498 } | |
499 #endif | |
500 } | 484 } |
501 | 485 |
502 FX_BOOL app::setInterval(OBJ_METHOD_PARAMS) | 486 FX_BOOL app::setInterval(OBJ_METHOD_PARAMS) |
503 { | 487 { |
504 if (params.size() > 2 || params.size() == 0) | 488 if (params.size() > 2 || params.size() == 0) |
505 { | 489 { |
506 sError = JSGetStringFromID((CJS_Context*)cc, IDS_STRING_JSPARAME
RROR); | 490 sError = JSGetStringFromID((CJS_Context*)cc, IDS_STRING_JSPARAME
RROR); |
507 return FALSE; | 491 return FALSE; |
508 } | 492 } |
509 | 493 |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1023 | 1007 |
1024 FX_BOOL app::openDoc(OBJ_METHOD_PARAMS) | 1008 FX_BOOL app::openDoc(OBJ_METHOD_PARAMS) |
1025 { | 1009 { |
1026 return FALSE; | 1010 return FALSE; |
1027 } | 1011 } |
1028 | 1012 |
1029 FX_BOOL app::response(OBJ_METHOD_PARAMS) | 1013 FX_BOOL app::response(OBJ_METHOD_PARAMS) |
1030 { | 1014 { |
1031 CFX_WideString swQuestion = L""; | 1015 CFX_WideString swQuestion = L""; |
1032 CFX_WideString swLabel = L""; | 1016 CFX_WideString swLabel = L""; |
1033 #ifndef FOXIT_CHROME_BUILD | |
1034 CFX_WideString swTitle = L"Foxit"; | |
1035 #else | |
1036 CFX_WideString swTitle = L"PDF"; | 1017 CFX_WideString swTitle = L"PDF"; |
1037 #endif | |
1038 CFX_WideString swDefault = L""; | 1018 CFX_WideString swDefault = L""; |
1039 bool bPassWord = false; | 1019 bool bPassWord = false; |
1040 | 1020 |
1041 v8::Isolate* isolate = GetIsolate(cc); | 1021 v8::Isolate* isolate = GetIsolate(cc); |
1042 | 1022 |
1043 int iLength = params.size(); | 1023 int iLength = params.size(); |
1044 if (iLength > 0 && params[0].GetType() == VT_object) | 1024 if (iLength > 0 && params[0].GetType() == VT_object) |
1045 { | 1025 { |
1046 JSObject pObj = (JSObject )params[0]; | 1026 JSObject pObj = (JSObject )params[0]; |
1047 v8::Handle<v8::Value> pValue = JS_GetObjectElement(isolate,pObj,
L"cQuestion"); | 1027 v8::Handle<v8::Value> pValue = JS_GetObjectElement(isolate,pObj,
L"cQuestion"); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 FX_BOOL app::media(OBJ_PROP_PARAMS) | 1093 FX_BOOL app::media(OBJ_PROP_PARAMS) |
1114 { | 1094 { |
1115 return FALSE; | 1095 return FALSE; |
1116 } | 1096 } |
1117 | 1097 |
1118 FX_BOOL app::execDialog(OBJ_METHOD_PARAMS) | 1098 FX_BOOL app::execDialog(OBJ_METHOD_PARAMS) |
1119 { | 1099 { |
1120 return TRUE; | 1100 return TRUE; |
1121 } | 1101 } |
1122 | 1102 |
OLD | NEW |