| 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 "../../include/fsdk_mgr.h" // For CPDFDoc_Environment. | |
| 10 #include "../../include/javascript/IJavaScript.h" | |
| 11 #include "Consts.h" | 9 #include "Consts.h" |
| 12 #include "Document.h" | 10 #include "Document.h" |
| 13 #include "Field.h" | 11 #include "Field.h" |
| 14 #include "Icon.h" | 12 #include "Icon.h" |
| 15 #include "JS_Context.h" | 13 #include "JS_Context.h" |
| 16 #include "JS_Define.h" | 14 #include "JS_Define.h" |
| 17 #include "JS_EventHandler.h" | 15 #include "JS_EventHandler.h" |
| 18 #include "JS_GlobalData.h" | 16 #include "JS_GlobalData.h" |
| 19 #include "JS_Object.h" | 17 #include "JS_Object.h" |
| 20 #include "JS_Value.h" | 18 #include "JS_Value.h" |
| 21 #include "PublicMethods.h" | 19 #include "PublicMethods.h" |
| 22 #include "app.h" | 20 #include "app.h" |
| 23 #include "color.h" | 21 #include "color.h" |
| 24 #include "console.h" | 22 #include "console.h" |
| 25 #include "event.h" | 23 #include "event.h" |
| 24 #include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment. |
| 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 | 29 |
| 30 // static | 30 // static |
| 31 void IJS_Runtime::Initialize(unsigned int slot, void* isolate) { | 31 void IJS_Runtime::Initialize(unsigned int slot, void* isolate) { |
| 32 FXJS_Initialize(slot, reinterpret_cast<v8::Isolate*>(isolate)); | 32 FXJS_Initialize(slot, reinterpret_cast<v8::Isolate*>(isolate)); |
| 33 } | 33 } |
| 34 | 34 |
| 35 // static | 35 // static |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 | 207 |
| 208 void CJS_Runtime::AddObserver(Observer* observer) { | 208 void CJS_Runtime::AddObserver(Observer* observer) { |
| 209 ASSERT(m_observers.find(observer) == m_observers.end()); | 209 ASSERT(m_observers.find(observer) == m_observers.end()); |
| 210 m_observers.insert(observer); | 210 m_observers.insert(observer); |
| 211 } | 211 } |
| 212 | 212 |
| 213 void CJS_Runtime::RemoveObserver(Observer* observer) { | 213 void CJS_Runtime::RemoveObserver(Observer* observer) { |
| 214 ASSERT(m_observers.find(observer) != m_observers.end()); | 214 ASSERT(m_observers.find(observer) != m_observers.end()); |
| 215 m_observers.erase(observer); | 215 m_observers.erase(observer); |
| 216 } | 216 } |
| OLD | NEW |