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

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

Issue 1395733006: Allow compiling PDFium without V8. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Always build with V8 under GN. Created 5 years, 2 months 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
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 #include "../../include/fsdk_mgr.h" // For CPDFDoc_Environment. 9 #include "../../include/fsdk_mgr.h" // For CPDFDoc_Environment.
10 #include "../../include/javascript/IJavaScript.h" 10 #include "../../include/javascript/IJavaScript.h"
11 #include "Consts.h" 11 #include "Consts.h"
12 #include "Document.h" 12 #include "Document.h"
13 #include "Field.h" 13 #include "Field.h"
14 #include "Icon.h" 14 #include "Icon.h"
15 #include "JS_Context.h" 15 #include "JS_Context.h"
16 #include "JS_Define.h" 16 #include "JS_Define.h"
17 #include "JS_EventHandler.h" 17 #include "JS_EventHandler.h"
18 #include "JS_GlobalData.h" 18 #include "JS_GlobalData.h"
19 #include "JS_Object.h" 19 #include "JS_Object.h"
20 #include "JS_Value.h" 20 #include "JS_Value.h"
21 #include "PublicMethods.h" 21 #include "PublicMethods.h"
22 #include "app.h" 22 #include "app.h"
23 #include "color.h" 23 #include "color.h"
24 #include "console.h" 24 #include "console.h"
25 #include "event.h" 25 #include "event.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 /* ------------------------------ CJS_Runtime ------------------------------ */ 30 // static
31 void IJS_Runtime::Initialize(unsigned int slot, void* isolate) {
32 FXJS_Initialize(slot, reinterpret_cast<v8::Isolate*>(isolate));
33 }
31 34
35 // static
32 IJS_Runtime* IJS_Runtime::Create(CPDFDoc_Environment* pEnv) { 36 IJS_Runtime* IJS_Runtime::Create(CPDFDoc_Environment* pEnv) {
33 return new CJS_Runtime(pEnv); 37 return new CJS_Runtime(pEnv);
34 } 38 }
35 39
36 CJS_Runtime::CJS_Runtime(CPDFDoc_Environment* pApp) 40 CJS_Runtime::CJS_Runtime(CPDFDoc_Environment* pApp)
37 : m_pApp(pApp), 41 : m_pApp(pApp),
38 m_pDocument(NULL), 42 m_pDocument(NULL),
39 m_bBlocking(FALSE), 43 m_bBlocking(FALSE),
40 m_isolate(NULL), 44 m_isolate(NULL),
41 m_isolateManaged(false) { 45 m_isolateManaged(false) {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 void CJS_Runtime::RemoveObserver(Observer* observer) { 195 void CJS_Runtime::RemoveObserver(Observer* observer) {
192 ASSERT(m_observers.find(observer) != m_observers.end()); 196 ASSERT(m_observers.find(observer) != m_observers.end());
193 m_observers.erase(observer); 197 m_observers.erase(observer);
194 } 198 }
195 199
196 CFX_WideString ChangeObjName(const CFX_WideString& str) { 200 CFX_WideString ChangeObjName(const CFX_WideString& str) {
197 CFX_WideString sRet = str; 201 CFX_WideString sRet = str;
198 sRet.Replace(L"_", L"."); 202 sRet.Replace(L"_", L".");
199 return sRet; 203 return sRet;
200 } 204 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fpdfview.cpp ('k') | fpdfsdk/src/javascript/JS_Stub.cpp » ('j') | pdfium.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698