| 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 "JS_Runtime.h" | 7 #include "JS_Runtime.h" |
| 8 | 8 |
| 9 #include "Consts.h" | 9 #include "Consts.h" |
| 10 #include "Document.h" | 10 #include "Document.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "console.h" | 22 #include "console.h" |
| 23 #include "event.h" | 23 #include "event.h" |
| 24 #include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment. | 24 #include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment. |
| 25 #include "fpdfsdk/include/javascript/IJavaScript.h" | 25 #include "fpdfsdk/include/javascript/IJavaScript.h" |
| 26 #include "global.h" | 26 #include "global.h" |
| 27 #include "report.h" | 27 #include "report.h" |
| 28 #include "util.h" | 28 #include "util.h" |
| 29 #include "third_party/base/stl_util.h" | 29 #include "third_party/base/stl_util.h" |
| 30 | 30 |
| 31 #ifdef PDF_ENABLE_XFA | 31 #ifdef PDF_ENABLE_XFA |
| 32 #include "../../../xfa/src/fxjse/src/value.h" | 32 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_app.h" |
| 33 #include "../../include/fpdfxfa/fpdfxfa_app.h" | 33 #include "xfa/src/fxjse/src/value.h" |
| 34 #endif // PDF_ENABLE_XFA | 34 #endif // PDF_ENABLE_XFA |
| 35 | 35 |
| 36 // static | 36 // static |
| 37 void IJS_Runtime::Initialize(unsigned int slot, void* isolate) { | 37 void IJS_Runtime::Initialize(unsigned int slot, void* isolate) { |
| 38 FXJS_Initialize(slot, reinterpret_cast<v8::Isolate*>(isolate)); | 38 FXJS_Initialize(slot, reinterpret_cast<v8::Isolate*>(isolate)); |
| 39 } | 39 } |
| 40 | 40 |
| 41 // static | 41 // static |
| 42 IJS_Runtime* IJS_Runtime::Create(CPDFDoc_Environment* pEnv) { | 42 IJS_Runtime* IJS_Runtime::Create(CPDFDoc_Environment* pEnv) { |
| 43 return new CJS_Runtime(pEnv); | 43 return new CJS_Runtime(pEnv); |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 #endif | 328 #endif |
| 329 void CJS_Runtime::AddObserver(Observer* observer) { | 329 void CJS_Runtime::AddObserver(Observer* observer) { |
| 330 ASSERT(!pdfium::ContainsKey(m_observers, observer)); | 330 ASSERT(!pdfium::ContainsKey(m_observers, observer)); |
| 331 m_observers.insert(observer); | 331 m_observers.insert(observer); |
| 332 } | 332 } |
| 333 | 333 |
| 334 void CJS_Runtime::RemoveObserver(Observer* observer) { | 334 void CJS_Runtime::RemoveObserver(Observer* observer) { |
| 335 ASSERT(pdfium::ContainsKey(m_observers, observer)); | 335 ASSERT(pdfium::ContainsKey(m_observers, observer)); |
| 336 m_observers.erase(observer); | 336 m_observers.erase(observer); |
| 337 } | 337 } |
| OLD | NEW |