Chromium Code Reviews| 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" | |
| 8 #include "../../include/javascript/IJavaScript.h" | 7 #include "../../include/javascript/IJavaScript.h" |
| 9 #include "../../include/javascript/JS_EventHandler.h" | 8 #include "JS_EventHandler.h" |
| 10 #include "../../include/javascript/JS_Runtime.h" | 9 #include "JS_Runtime.h" |
|
Lei Zhang
2015/10/05 23:39:25
Put this first.
Tom Sepez
2015/10/06 00:10:55
Done.
| |
| 11 #include "../../include/javascript/JS_Context.h" | 10 #include "JS_Context.h" |
| 12 #include "../../include/javascript/JS_Define.h" | 11 #include "JS_Define.h" |
| 13 #include "../../include/javascript/JS_Object.h" | 12 #include "JS_Object.h" |
| 14 #include "../../include/javascript/JS_Value.h" | 13 #include "JS_Value.h" |
| 15 #include "../../include/javascript/app.h" | 14 #include "app.h" |
| 16 #include "../../include/javascript/color.h" | 15 #include "color.h" |
| 17 #include "../../include/javascript/Consts.h" | 16 #include "Consts.h" |
| 18 #include "../../include/javascript/Document.h" | 17 #include "Document.h" |
| 19 #include "../../include/javascript/event.h" | 18 #include "event.h" |
| 20 #include "../../include/javascript/Field.h" | 19 #include "Field.h" |
| 21 #include "../../include/javascript/Icon.h" | 20 #include "Icon.h" |
| 22 #include "../../include/javascript/PublicMethods.h" | 21 #include "PublicMethods.h" |
| 23 #include "../../include/javascript/report.h" | 22 #include "report.h" |
| 24 #include "../../include/javascript/util.h" | 23 #include "util.h" |
| 25 #include "../../include/javascript/JS_GlobalData.h" | 24 #include "JS_GlobalData.h" |
| 26 #include "../../include/javascript/global.h" | 25 #include "global.h" |
| 27 #include "../../include/javascript/console.h" | 26 #include "console.h" |
| 28 | 27 |
| 29 /* ------------------------------ CJS_Runtime ------------------------------ */ | 28 /* ------------------------------ CJS_Runtime ------------------------------ */ |
| 30 | 29 |
| 30 IFXJS_Runtime* IFXJS_Runtime::Create(CPDFDoc_Environment* pEnv) { | |
| 31 return new CJS_Runtime(pEnv); | |
| 32 } | |
| 33 | |
| 31 CJS_Runtime::CJS_Runtime(CPDFDoc_Environment* pApp) | 34 CJS_Runtime::CJS_Runtime(CPDFDoc_Environment* pApp) |
| 32 : m_pApp(pApp), | 35 : m_pApp(pApp), |
| 33 m_pDocument(NULL), | 36 m_pDocument(NULL), |
| 34 m_bBlocking(FALSE), | 37 m_bBlocking(FALSE), |
| 35 m_isolate(NULL), | 38 m_isolate(NULL), |
| 36 m_isolateManaged(false) { | 39 m_isolateManaged(false) { |
| 37 IPDF_JSPLATFORM* pPlatform = m_pApp->GetFormFillInfo()->m_pJsPlatform; | 40 IPDF_JSPLATFORM* pPlatform = m_pApp->GetFormFillInfo()->m_pJsPlatform; |
| 38 if (pPlatform->version <= 2) { | 41 if (pPlatform->version <= 2) { |
| 39 unsigned int embedderDataSlot = 0; | 42 unsigned int embedderDataSlot = 0; |
| 40 v8::Isolate* pExternalIsolate = nullptr; | 43 v8::Isolate* pExternalIsolate = nullptr; |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 187 void CJS_Runtime::RemoveObserver(Observer* observer) { | 190 void CJS_Runtime::RemoveObserver(Observer* observer) { |
| 188 ASSERT(m_observers.find(observer) != m_observers.end()); | 191 ASSERT(m_observers.find(observer) != m_observers.end()); |
| 189 m_observers.erase(observer); | 192 m_observers.erase(observer); |
| 190 } | 193 } |
| 191 | 194 |
| 192 CFX_WideString ChangeObjName(const CFX_WideString& str) { | 195 CFX_WideString ChangeObjName(const CFX_WideString& str) { |
| 193 CFX_WideString sRet = str; | 196 CFX_WideString sRet = str; |
| 194 sRet.Replace(L"_", L"."); | 197 sRet.Replace(L"_", L"."); |
| 195 return sRet; | 198 return sRet; |
| 196 } | 199 } |
| OLD | NEW |