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

Side by Side Diff: fpdfsdk/include/javascript/JS_Object.h

Issue 1292653002: Merge to XFA: Remove if checks after new. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@xfa
Patch Set: Created 5 years, 4 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/include/fxedit/fxet_edit.h ('k') | fpdfsdk/src/fxedit/fxet_list.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 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 #ifndef FPDFSDK_INCLUDE_JAVASCRIPT_JS_OBJECT_H_ 7 #ifndef FPDFSDK_INCLUDE_JAVASCRIPT_JS_OBJECT_H_
8 #define FPDFSDK_INCLUDE_JAVASCRIPT_JS_OBJECT_H_ 8 #define FPDFSDK_INCLUDE_JAVASCRIPT_JS_OBJECT_H_
9 9
10 #include "../fsdk_define.h" // For FX_UINT 10 #include "../fsdk_define.h" // For FX_UINT
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 m_Array.RemoveAll(); 102 m_Array.RemoveAll();
103 } 103 }
104 104
105 void SetAt(FX_UINT nIndex, CJS_Timer* pTimer) { 105 void SetAt(FX_UINT nIndex, CJS_Timer* pTimer) {
106 int i = Find(nIndex); 106 int i = Find(nIndex);
107 107
108 if (i >= 0) { 108 if (i >= 0) {
109 if (JS_TIMER_MAP* pMap = m_Array.GetAt(i)) 109 if (JS_TIMER_MAP* pMap = m_Array.GetAt(i))
110 pMap->pTimer = pTimer; 110 pMap->pTimer = pTimer;
111 } else { 111 } else {
112 if (JS_TIMER_MAP* pMap = new JS_TIMER_MAP) { 112 JS_TIMER_MAP* pMap = new JS_TIMER_MAP;
113 pMap->nID = nIndex; 113 pMap->nID = nIndex;
114 pMap->pTimer = pTimer; 114 pMap->pTimer = pTimer;
115 m_Array.Add(pMap); 115 m_Array.Add(pMap);
116 }
117 } 116 }
118 } 117 }
119 118
120 CJS_Timer* GetAt(FX_UINT nIndex) { 119 CJS_Timer* GetAt(FX_UINT nIndex) {
121 int i = Find(nIndex); 120 int i = Find(nIndex);
122 121
123 if (i >= 0) { 122 if (i >= 0) {
124 if (JS_TIMER_MAP* pMap = m_Array.GetAt(i)) 123 if (JS_TIMER_MAP* pMap = m_Array.GetAt(i))
125 return pMap->pTimer; 124 return pMap->pTimer;
126 } 125 }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 FX_DWORD m_dwTimeOut; 239 FX_DWORD m_dwTimeOut;
241 FX_DWORD m_dwElapse; 240 FX_DWORD m_dwElapse;
242 CJS_Runtime* m_pRuntime; 241 CJS_Runtime* m_pRuntime;
243 CFX_WideString m_swJScript; 242 CFX_WideString m_swJScript;
244 int m_nType; // 0:Interval; 1:TimeOut 243 int m_nType; // 0:Interval; 1:TimeOut
245 244
246 CPDFDoc_Environment* m_pApp; 245 CPDFDoc_Environment* m_pApp;
247 }; 246 };
248 247
249 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_JS_OBJECT_H_ 248 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_JS_OBJECT_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/fxedit/fxet_edit.h ('k') | fpdfsdk/src/fxedit/fxet_list.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698