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

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

Issue 2384323005: Cleanup some CPDFSDK_PageView annotation code. (Closed)
Patch Set: Review feedback Created 4 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/javascript/Document.cpp ('k') | no next file » | 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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 iType = newParams[2].ToInt(pRuntime); 426 iType = newParams[2].ToInt(pRuntime);
427 427
428 CFX_WideString swTitle; 428 CFX_WideString swTitle;
429 if (newParams[3].GetType() != CJS_Value::VT_unknown) 429 if (newParams[3].GetType() != CJS_Value::VT_unknown)
430 swTitle = newParams[3].ToCFXWideString(pRuntime); 430 swTitle = newParams[3].ToCFXWideString(pRuntime);
431 else 431 else
432 swTitle = JSGetStringFromID(IDS_STRING_JSALERT); 432 swTitle = JSGetStringFromID(IDS_STRING_JSALERT);
433 433
434 pRuntime->BeginBlock(); 434 pRuntime->BeginBlock();
435 if (CPDFSDK_Document* pDoc = pEnv->GetSDKDocument()) 435 if (CPDFSDK_Document* pDoc = pEnv->GetSDKDocument())
436 pDoc->KillFocusAnnot(); 436 pDoc->KillFocusAnnot(0);
437 437
438 vRet = CJS_Value(pRuntime, pEnv->JS_appAlert(swMsg.c_str(), swTitle.c_str(), 438 vRet = CJS_Value(pRuntime, pEnv->JS_appAlert(swMsg.c_str(), swTitle.c_str(),
439 iType, iIcon)); 439 iType, iIcon));
440 pRuntime->EndBlock(); 440 pRuntime->EndBlock();
441 return TRUE; 441 return TRUE;
442 } 442 }
443 443
444 FX_BOOL app::beep(IJS_Context* cc, 444 FX_BOOL app::beep(IJS_Context* cc,
445 const std::vector<CJS_Value>& params, 445 const std::vector<CJS_Value>& params,
446 CJS_Value& vRet, 446 CJS_Value& vRet,
(...skipping 365 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/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698