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

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

Issue 2035743002: Remove unused context param from execute. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 6 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/JS_Runtime_Stub.cpp ('k') | fpdfsdk/javascript/cjs_runtime.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/cjs_context.h" 7 #include "fpdfsdk/javascript/cjs_context.h"
8 8
9 #include "fpdfsdk/javascript/JS_EventHandler.h" 9 #include "fpdfsdk/javascript/JS_EventHandler.h"
10 #include "fpdfsdk/javascript/cjs_runtime.h" 10 #include "fpdfsdk/javascript/cjs_runtime.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 CJS_Runtime::FieldEvent event(m_pEventHandler->TargetName(), 44 CJS_Runtime::FieldEvent event(m_pEventHandler->TargetName(),
45 m_pEventHandler->EventType()); 45 m_pEventHandler->EventType());
46 if (!m_pRuntime->AddEventToSet(event)) { 46 if (!m_pRuntime->AddEventToSet(event)) {
47 *info = JSGetStringFromID(this, IDS_STRING_JSEVENT); 47 *info = JSGetStringFromID(this, IDS_STRING_JSEVENT);
48 return FALSE; 48 return FALSE;
49 } 49 }
50 50
51 CFX_WideString sErrorMessage; 51 CFX_WideString sErrorMessage;
52 int nRet = 0; 52 int nRet = 0;
53 if (script.GetLength() > 0) { 53 if (script.GetLength() > 0) {
54 nRet = m_pRuntime->Execute(this, script.c_str(), &sErrorMessage); 54 nRet = m_pRuntime->Execute(script.c_str(), &sErrorMessage);
55 } 55 }
56 56
57 if (nRet < 0) { 57 if (nRet < 0) {
58 *info += sErrorMessage; 58 *info += sErrorMessage;
59 } else { 59 } else {
60 *info = JSGetStringFromID(this, IDS_STRING_RUN); 60 *info = JSGetStringFromID(this, IDS_STRING_RUN);
61 } 61 }
62 62
63 m_pRuntime->RemoveEventFromSet(event); 63 m_pRuntime->RemoveEventFromSet(event);
64 m_pEventHandler->Destroy(); 64 m_pEventHandler->Destroy();
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 } 269 }
270 270
271 void CJS_Context::OnBatchExec(CPDFSDK_Document* pTarget) { 271 void CJS_Context::OnBatchExec(CPDFSDK_Document* pTarget) {
272 m_pEventHandler->OnBatchExec(pTarget); 272 m_pEventHandler->OnBatchExec(pTarget);
273 } 273 }
274 274
275 void CJS_Context::OnMenu_Exec(CPDFSDK_Document* pTarget, 275 void CJS_Context::OnMenu_Exec(CPDFSDK_Document* pTarget,
276 const CFX_WideString& strTargetName) { 276 const CFX_WideString& strTargetName) {
277 m_pEventHandler->OnMenu_Exec(pTarget, strTargetName); 277 m_pEventHandler->OnMenu_Exec(pTarget, strTargetName);
278 } 278 }
OLDNEW
« no previous file with comments | « fpdfsdk/javascript/JS_Runtime_Stub.cpp ('k') | fpdfsdk/javascript/cjs_runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698