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

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

Issue 1477583002: Inflict PDF_ENABLE_XFA ifdefs on XFA fpdfsdk/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Remove fsdk_actionhandler.cpp 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.cpp ('k') | fpdfsdk/src/javascript/app.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 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 "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment. 7 #include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment.
8 #include "fpdfsdk/include/javascript/IJavaScript.h" 8 #include "fpdfsdk/include/javascript/IJavaScript.h"
9 #include "third_party/base/nonstd_unique_ptr.h" 9 #include "third_party/base/nonstd_unique_ptr.h"
10 10
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } 129 }
130 130
131 IJS_Context* GetCurrentContext() override { return m_pContext.get(); } 131 IJS_Context* GetCurrentContext() override { return m_pContext.get(); }
132 void ReleaseContext(IJS_Context* pContext) override {} 132 void ReleaseContext(IJS_Context* pContext) override {}
133 133
134 void SetReaderDocument(CPDFSDK_Document* pReaderDoc) override { 134 void SetReaderDocument(CPDFSDK_Document* pReaderDoc) override {
135 m_pDoc = pReaderDoc; 135 m_pDoc = pReaderDoc;
136 } 136 }
137 CPDFSDK_Document* GetReaderDocument() override { return m_pDoc; } 137 CPDFSDK_Document* GetReaderDocument() override { return m_pDoc; }
138 138
139 #ifdef PDF_ENABLE_XFA
139 virtual FX_BOOL GetHValueByName(const CFX_ByteStringC&, 140 virtual FX_BOOL GetHValueByName(const CFX_ByteStringC&,
140 FXJSE_HVALUE) override { 141 FXJSE_HVALUE) override {
141 return FALSE; 142 return FALSE;
142 } 143 }
143 144
144 virtual FX_BOOL SetHValueByName(const CFX_ByteStringC&, 145 virtual FX_BOOL SetHValueByName(const CFX_ByteStringC&,
145 FXJSE_HVALUE) override { 146 FXJSE_HVALUE) override {
146 return FALSE; 147 return FALSE;
147 } 148 }
148 149
150 #endif
149 int Execute(IJS_Context* cc, 151 int Execute(IJS_Context* cc,
150 const wchar_t* script, 152 const wchar_t* script,
151 CFX_WideString* info) override { 153 CFX_WideString* info) override {
152 return 0; 154 return 0;
153 } 155 }
154 156
155 protected: 157 protected:
156 CPDFSDK_Document* m_pDoc; 158 CPDFSDK_Document* m_pDoc;
157 nonstd::unique_ptr<CJS_ContextStub> m_pContext; 159 nonstd::unique_ptr<CJS_ContextStub> m_pContext;
158 }; 160 };
159 161
160 // static 162 // static
161 void IJS_Runtime::Initialize(unsigned int slot, void* isolate) { 163 void IJS_Runtime::Initialize(unsigned int slot, void* isolate) {
162 } 164 }
163 165
164 // static 166 // static
165 IJS_Runtime* IJS_Runtime::Create(CPDFDoc_Environment* pEnv) { 167 IJS_Runtime* IJS_Runtime::Create(CPDFDoc_Environment* pEnv) {
166 return new CJS_RuntimeStub; 168 return new CJS_RuntimeStub;
167 } 169 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/javascript/JS_Runtime.cpp ('k') | fpdfsdk/src/javascript/app.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698