Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Side by Side Diff: fpdfsdk/src/javascript/JS_Runtime.cpp

Issue 1484843002: Tidy ifdefs in fpdfsdk. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Fix initialization error warning. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/src/javascript/JS_Runtime.h ('k') | fpdfsdk/src/javascript/JS_Runtime_Stub.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifdef PDF_ENABLE_XFA
10 #include "../../../xfa/src/fxjse/src/value.h"
11 #include "../../include/fpdfxfa/fpdfxfa_app.h"
12 #endif
13 #include "Consts.h" 9 #include "Consts.h"
14 #include "Document.h" 10 #include "Document.h"
15 #include "Field.h" 11 #include "Field.h"
16 #include "Icon.h" 12 #include "Icon.h"
17 #include "JS_Context.h" 13 #include "JS_Context.h"
18 #include "JS_Define.h" 14 #include "JS_Define.h"
19 #include "JS_EventHandler.h" 15 #include "JS_EventHandler.h"
20 #include "JS_GlobalData.h" 16 #include "JS_GlobalData.h"
21 #include "JS_Object.h" 17 #include "JS_Object.h"
22 #include "JS_Value.h" 18 #include "JS_Value.h"
23 #include "PublicMethods.h" 19 #include "PublicMethods.h"
24 #include "app.h" 20 #include "app.h"
25 #include "color.h" 21 #include "color.h"
26 #include "console.h" 22 #include "console.h"
27 #include "event.h" 23 #include "event.h"
28 #include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment. 24 #include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment.
29 #include "fpdfsdk/include/javascript/IJavaScript.h" 25 #include "fpdfsdk/include/javascript/IJavaScript.h"
30 #include "global.h" 26 #include "global.h"
31 #include "report.h" 27 #include "report.h"
32 #include "util.h" 28 #include "util.h"
33 29
30 #ifdef PDF_ENABLE_XFA
31 #include "../../../xfa/src/fxjse/src/value.h"
32 #include "../../include/fpdfxfa/fpdfxfa_app.h"
33 #endif // PDF_ENABLE_XFA
34
34 // static 35 // static
35 void IJS_Runtime::Initialize(unsigned int slot, void* isolate) { 36 void IJS_Runtime::Initialize(unsigned int slot, void* isolate) {
36 FXJS_Initialize(slot, reinterpret_cast<v8::Isolate*>(isolate)); 37 FXJS_Initialize(slot, reinterpret_cast<v8::Isolate*>(isolate));
37 } 38 }
38 39
39 // static 40 // static
40 IJS_Runtime* IJS_Runtime::Create(CPDFDoc_Environment* pEnv) { 41 IJS_Runtime* IJS_Runtime::Create(CPDFDoc_Environment* pEnv) {
41 return new CJS_Runtime(pEnv); 42 return new CJS_Runtime(pEnv);
42 } 43 }
43 44
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 #endif 327 #endif
327 void CJS_Runtime::AddObserver(Observer* observer) { 328 void CJS_Runtime::AddObserver(Observer* observer) {
328 ASSERT(m_observers.find(observer) == m_observers.end()); 329 ASSERT(m_observers.find(observer) == m_observers.end());
329 m_observers.insert(observer); 330 m_observers.insert(observer);
330 } 331 }
331 332
332 void CJS_Runtime::RemoveObserver(Observer* observer) { 333 void CJS_Runtime::RemoveObserver(Observer* observer) {
333 ASSERT(m_observers.find(observer) != m_observers.end()); 334 ASSERT(m_observers.find(observer) != m_observers.end());
334 m_observers.erase(observer); 335 m_observers.erase(observer);
335 } 336 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/javascript/JS_Runtime.h ('k') | fpdfsdk/src/javascript/JS_Runtime_Stub.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698