OLD | NEW |
1 // Copyright 2015 PDFium Authors. All rights reserved. | 1 // Copyright 2015 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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment. | 9 #include "fpdfsdk/include/fsdk_mgr.h" |
10 #include "fpdfsdk/include/javascript/IJavaScript.h" | 10 #include "fpdfsdk/javascript/ijs_context.h" |
| 11 #include "fpdfsdk/javascript/ijs_runtime.h" |
11 | 12 |
12 class CJS_ContextStub final : public IJS_Context { | 13 class CJS_ContextStub final : public IJS_Context { |
13 public: | 14 public: |
14 CJS_ContextStub() {} | 15 CJS_ContextStub() {} |
15 ~CJS_ContextStub() override {} | 16 ~CJS_ContextStub() override {} |
16 | 17 |
17 // IJS_Context: | 18 // IJS_Context: |
18 FX_BOOL RunScript(const CFX_WideString& script, | 19 FX_BOOL RunScript(const CFX_WideString& script, |
19 CFX_WideString* info) override { | 20 CFX_WideString* info) override { |
20 return FALSE; | 21 return FALSE; |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 std::unique_ptr<CJS_ContextStub> m_pContext; | 159 std::unique_ptr<CJS_ContextStub> m_pContext; |
159 }; | 160 }; |
160 | 161 |
161 // static | 162 // static |
162 void IJS_Runtime::Initialize(unsigned int slot, void* isolate) {} | 163 void IJS_Runtime::Initialize(unsigned int slot, void* isolate) {} |
163 | 164 |
164 // static | 165 // static |
165 IJS_Runtime* IJS_Runtime::Create(CPDFDoc_Environment* pEnv) { | 166 IJS_Runtime* IJS_Runtime::Create(CPDFDoc_Environment* pEnv) { |
166 return new CJS_RuntimeStub; | 167 return new CJS_RuntimeStub; |
167 } | 168 } |
OLD | NEW |