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

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: PDFium Authors 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
« no previous file with comments | « fpdfsdk/src/fpdfview.cpp ('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 #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
32 // static 35 // static
33 IJS_Runtime* IJS_Runtime::Create(CPDFDoc_Environment* pEnv) { 36 IJS_Runtime* IJS_Runtime::Create(CPDFDoc_Environment* pEnv) {
34 return new CJS_Runtime(pEnv); 37 return new CJS_Runtime(pEnv);
35 } 38 }
36 39
37 // static 40 // static
38 CJS_Runtime* CJS_Runtime::FromContext(const IJS_Context* cc) { 41 CJS_Runtime* CJS_Runtime::FromContext(const IJS_Context* cc) {
39 const CJS_Context* pContext = static_cast<const CJS_Context*>(cc); 42 const CJS_Context* pContext = static_cast<const CJS_Context*>(cc);
40 return pContext->GetJSRuntime(); 43 return pContext->GetJSRuntime();
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 void CJS_Runtime::RemoveObserver(Observer* observer) { 201 void CJS_Runtime::RemoveObserver(Observer* observer) {
199 ASSERT(m_observers.find(observer) != m_observers.end()); 202 ASSERT(m_observers.find(observer) != m_observers.end());
200 m_observers.erase(observer); 203 m_observers.erase(observer);
201 } 204 }
202 205
203 CFX_WideString ChangeObjName(const CFX_WideString& str) { 206 CFX_WideString ChangeObjName(const CFX_WideString& str) {
204 CFX_WideString sRet = str; 207 CFX_WideString sRet = str;
205 sRet.Replace(L"_", L"."); 208 sRet.Replace(L"_", L".");
206 return sRet; 209 return sRet;
207 } 210 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fpdfview.cpp ('k') | fpdfsdk/src/javascript/JS_Runtime_Stub.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698