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 "fpdfsdk/javascript/app.h" | 7 #include "fpdfsdk/javascript/app.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 if (params.size() != 1) { | 451 if (params.size() != 1) { |
452 sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR); | 452 sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR); |
453 return FALSE; | 453 return FALSE; |
454 } | 454 } |
455 | 455 |
456 app::ClearTimerCommon(params[0]); | 456 app::ClearTimerCommon(params[0]); |
457 return TRUE; | 457 return TRUE; |
458 } | 458 } |
459 | 459 |
460 void app::ClearTimerCommon(const CJS_Value& param) { | 460 void app::ClearTimerCommon(const CJS_Value& param) { |
461 if (param.GetType() != CJS_Value::VT_fxobject) | 461 if (param.GetType() != CJS_Value::VT_object) |
462 return; | 462 return; |
463 | 463 |
464 v8::Local<v8::Object> pObj = param.ToV8Object(); | 464 v8::Local<v8::Object> pObj = param.ToV8Object(); |
465 if (FXJS_GetObjDefnID(pObj) != CJS_TimerObj::g_nObjDefnID) | 465 if (FXJS_GetObjDefnID(pObj) != CJS_TimerObj::g_nObjDefnID) |
466 return; | 466 return; |
467 | 467 |
468 CJS_Object* pJSObj = param.ToCJSObject(); | 468 CJS_Object* pJSObj = param.ToCJSObject(); |
469 if (!pJSObj) | 469 if (!pJSObj) |
470 return; | 470 return; |
471 | 471 |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 FX_BOOL app::media(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { | 717 FX_BOOL app::media(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { |
718 return FALSE; | 718 return FALSE; |
719 } | 719 } |
720 | 720 |
721 FX_BOOL app::execDialog(IJS_Context* cc, | 721 FX_BOOL app::execDialog(IJS_Context* cc, |
722 const std::vector<CJS_Value>& params, | 722 const std::vector<CJS_Value>& params, |
723 CJS_Value& vRet, | 723 CJS_Value& vRet, |
724 CFX_WideString& sError) { | 724 CFX_WideString& sError) { |
725 return TRUE; | 725 return TRUE; |
726 } | 726 } |
OLD | NEW |