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

Side by Side Diff: fpdfsdk/javascript/app.cpp

Issue 2338303002: Remove FFI_ from CPDFSDK_Environment method names (Closed)
Patch Set: Review feedback Created 4 years, 3 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/javascript/Field.cpp ('k') | public/fpdf_formfill.h » ('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 "fpdfsdk/javascript/app.h" 7 #include "fpdfsdk/javascript/app.h"
8 8
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 FX_BOOL app::platform(IJS_Context* cc, 318 FX_BOOL app::platform(IJS_Context* cc,
319 CJS_PropValue& vp, 319 CJS_PropValue& vp,
320 CFX_WideString& sError) { 320 CFX_WideString& sError) {
321 if (!vp.IsGetting()) 321 if (!vp.IsGetting())
322 return FALSE; 322 return FALSE;
323 #ifdef PDF_ENABLE_XFA 323 #ifdef PDF_ENABLE_XFA
324 CPDFSDK_Environment* pEnv = 324 CPDFSDK_Environment* pEnv =
325 static_cast<CJS_Context*>(cc)->GetJSRuntime()->GetReaderApp(); 325 static_cast<CJS_Context*>(cc)->GetJSRuntime()->GetReaderApp();
326 if (!pEnv) 326 if (!pEnv)
327 return FALSE; 327 return FALSE;
328 CFX_WideString platfrom = pEnv->FFI_GetPlatform(); 328 CFX_WideString platfrom = pEnv->GetPlatform();
329 if (!platfrom.IsEmpty()) { 329 if (!platfrom.IsEmpty()) {
330 vp << platfrom; 330 vp << platfrom;
331 return TRUE; 331 return TRUE;
332 } 332 }
333 #endif 333 #endif
334 vp << JS_STR_PLATFORM; 334 vp << JS_STR_PLATFORM;
335 return TRUE; 335 return TRUE;
336 } 336 }
337 337
338 FX_BOOL app::language(IJS_Context* cc, 338 FX_BOOL app::language(IJS_Context* cc,
339 CJS_PropValue& vp, 339 CJS_PropValue& vp,
340 CFX_WideString& sError) { 340 CFX_WideString& sError) {
341 if (!vp.IsGetting()) 341 if (!vp.IsGetting())
342 return FALSE; 342 return FALSE;
343 #ifdef PDF_ENABLE_XFA 343 #ifdef PDF_ENABLE_XFA
344 CPDFSDK_Environment* pEnv = 344 CPDFSDK_Environment* pEnv =
345 static_cast<CJS_Context*>(cc)->GetJSRuntime()->GetReaderApp(); 345 static_cast<CJS_Context*>(cc)->GetJSRuntime()->GetReaderApp();
346 if (!pEnv) 346 if (!pEnv)
347 return FALSE; 347 return FALSE;
348 CFX_WideString language = pEnv->FFI_GetLanguage(); 348 CFX_WideString language = pEnv->GetLanguage();
349 if (!language.IsEmpty()) { 349 if (!language.IsEmpty()) {
350 vp << language; 350 vp << language;
351 return TRUE; 351 return TRUE;
352 } 352 }
353 #endif 353 #endif
354 vp << JS_STR_LANGUANGE; 354 vp << JS_STR_LANGUANGE;
355 return TRUE; 355 return TRUE;
356 } 356 }
357 357
358 // creates a new fdf object that contains no data 358 // creates a new fdf object that contains no data
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 FX_BOOL app::media(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { 812 FX_BOOL app::media(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) {
813 return FALSE; 813 return FALSE;
814 } 814 }
815 815
816 FX_BOOL app::execDialog(IJS_Context* cc, 816 FX_BOOL app::execDialog(IJS_Context* cc,
817 const std::vector<CJS_Value>& params, 817 const std::vector<CJS_Value>& params,
818 CJS_Value& vRet, 818 CJS_Value& vRet,
819 CFX_WideString& sError) { 819 CFX_WideString& sError) {
820 return TRUE; 820 return TRUE;
821 } 821 }
OLDNEW
« no previous file with comments | « fpdfsdk/javascript/Field.cpp ('k') | public/fpdf_formfill.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698