| 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/JS_Object.h" | 7 #include "fpdfsdk/javascript/JS_Object.h" |
| 8 | 8 |
| 9 #include "fpdfsdk/include/fsdk_mgr.h" | 9 #include "fpdfsdk/include/fsdk_mgr.h" |
| 10 #include "fpdfsdk/javascript/JS_Define.h" | 10 #include "fpdfsdk/javascript/JS_Define.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 void CJS_Object::MakeWeak() { | 69 void CJS_Object::MakeWeak() { |
| 70 m_pV8Object.SetWeak(this, DisposeObject, | 70 m_pV8Object.SetWeak(this, DisposeObject, |
| 71 v8::WeakCallbackType::kInternalFields); | 71 v8::WeakCallbackType::kInternalFields); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void CJS_Object::Dispose() { | 74 void CJS_Object::Dispose() { |
| 75 m_pV8Object.Reset(); | 75 m_pV8Object.Reset(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 FX_BOOL CJS_Object::IsType(const FX_CHAR* sClassName) { |
| 79 return TRUE; |
| 80 } |
| 81 |
| 82 CFX_ByteString CJS_Object::GetClassName() { |
| 83 return ""; |
| 84 } |
| 85 |
| 86 void CJS_Object::InitInstance(IJS_Runtime* pIRuntime) {} |
| 87 |
| 88 void CJS_Object::ExitInstance() {} |
| 89 |
| 78 int CJS_Object::MsgBox(CPDFDoc_Environment* pApp, | 90 int CJS_Object::MsgBox(CPDFDoc_Environment* pApp, |
| 79 const FX_WCHAR* swMsg, | 91 const FX_WCHAR* swMsg, |
| 80 const FX_WCHAR* swTitle, | 92 const FX_WCHAR* swTitle, |
| 81 FX_UINT nType, | 93 FX_UINT nType, |
| 82 FX_UINT nIcon) { | 94 FX_UINT nIcon) { |
| 83 return FXJS_MsgBox(pApp, swMsg, swTitle, nType, nIcon); | 95 return FXJS_MsgBox(pApp, swMsg, swTitle, nType, nIcon); |
| 84 } | 96 } |
| 85 | 97 |
| 86 void CJS_Object::Alert(CJS_Context* pContext, const FX_WCHAR* swMsg) { | 98 void CJS_Object::Alert(CJS_Context* pContext, const FX_WCHAR* swMsg) { |
| 87 if (pContext->IsMsgBoxEnabled()) { | 99 if (pContext->IsMsgBoxEnabled()) { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // static | 160 // static |
| 149 CJS_Timer::TimerMap* CJS_Timer::GetGlobalTimerMap() { | 161 CJS_Timer::TimerMap* CJS_Timer::GetGlobalTimerMap() { |
| 150 // Leak the timer array at shutdown. | 162 // Leak the timer array at shutdown. |
| 151 static auto* s_TimerMap = new TimerMap; | 163 static auto* s_TimerMap = new TimerMap; |
| 152 return s_TimerMap; | 164 return s_TimerMap; |
| 153 } | 165 } |
| 154 | 166 |
| 155 void CJS_Timer::OnDestroyed() { | 167 void CJS_Timer::OnDestroyed() { |
| 156 m_bValid = false; | 168 m_bValid = false; |
| 157 } | 169 } |
| OLD | NEW |