| 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" |
| 11 #include "../../include/javascript/JS_Context.h" | 11 #include "../../include/javascript/JS_Context.h" |
| 12 | 12 |
| 13 JS_TIMER_MAPARRAY& GetTimeMap() { | 13 JSTimerMap* GetGlobalTimerMap() { |
| 14 // Leak the timer array at shutdown. | 14 // Leak the timer array at shutdown. |
| 15 static auto* timeMap = new JS_TIMER_MAPARRAY; | 15 static auto* timeMap = new JSTimerMap; |
| 16 return *timeMap; | 16 return timeMap; |
| 17 } | 17 } |
| 18 | 18 |
| 19 int FXJS_MsgBox(CPDFDoc_Environment* pApp, | 19 int FXJS_MsgBox(CPDFDoc_Environment* pApp, |
| 20 CPDFSDK_PageView* pPageView, | 20 CPDFSDK_PageView* pPageView, |
| 21 const FX_WCHAR* swMsg, | 21 const FX_WCHAR* swMsg, |
| 22 const FX_WCHAR* swTitle, | 22 const FX_WCHAR* swTitle, |
| 23 FX_UINT nType, | 23 FX_UINT nType, |
| 24 FX_UINT nIcon) { | 24 FX_UINT nIcon) { |
| 25 if (!pApp) | 25 if (!pApp) |
| 26 return 0; | 26 return 0; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 void CJS_Object::Alert(CJS_Context* pContext, const FX_WCHAR* swMsg) { | 131 void CJS_Object::Alert(CJS_Context* pContext, const FX_WCHAR* swMsg) { |
| 132 ASSERT(pContext != NULL); | 132 ASSERT(pContext != NULL); |
| 133 | 133 |
| 134 if (pContext->IsMsgBoxEnabled()) { | 134 if (pContext->IsMsgBoxEnabled()) { |
| 135 CPDFDoc_Environment* pApp = pContext->GetReaderApp(); | 135 CPDFDoc_Environment* pApp = pContext->GetReaderApp(); |
| 136 if (pApp) | 136 if (pApp) |
| 137 pApp->JS_appAlert(swMsg, NULL, 0, 3); | 137 pApp->JS_appAlert(swMsg, NULL, 0, 3); |
| 138 } | 138 } |
| 139 } | 139 } |
| OLD | NEW |