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

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

Issue 1286383004: Kill JS_TIMER_MAPARRAY (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Clang-format 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/javascript/JS_Object.h ('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 "../../include/javascript/JavaScript.h" 7 #include "../../include/javascript/JavaScript.h"
8 #include "../../include/javascript/IJavaScript.h" 8 #include "../../include/javascript/IJavaScript.h"
9 #include "../../include/javascript/JS_Define.h" 9 #include "../../include/javascript/JS_Define.h"
10 #include "../../include/javascript/JS_Object.h" 10 #include "../../include/javascript/JS_Object.h"
11 #include "../../include/javascript/JS_Context.h" 11 #include "../../include/javascript/JS_Context.h"
12 12
13 JS_TIMER_MAPARRAY& GetTimeMap() { 13 JSTimerMap* GetGlobalTimerMap() {
14 // Leak the timer array at shutdown. 14 // Leak the timer array at shutdown.
15 static auto* timeMap = new JS_TIMER_MAPARRAY; 15 static auto* timeMap = new JSTimerMap;
16 return *timeMap; 16 return timeMap;
17 } 17 }
18 18
19 int FXJS_MsgBox(CPDFDoc_Environment* pApp, 19 int FXJS_MsgBox(CPDFDoc_Environment* pApp,
20 CPDFSDK_PageView* pPageView, 20 CPDFSDK_PageView* pPageView,
21 const FX_WCHAR* swMsg, 21 const FX_WCHAR* swMsg,
22 const FX_WCHAR* swTitle, 22 const FX_WCHAR* swTitle,
23 FX_UINT nType, 23 FX_UINT nType,
24 FX_UINT nIcon) { 24 FX_UINT nIcon) {
25 if (!pApp) 25 if (!pApp)
26 return 0; 26 return 0;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 void CJS_Object::Alert(CJS_Context* pContext, const FX_WCHAR* swMsg) { 131 void CJS_Object::Alert(CJS_Context* pContext, const FX_WCHAR* swMsg) {
132 ASSERT(pContext != NULL); 132 ASSERT(pContext != NULL);
133 133
134 if (pContext->IsMsgBoxEnabled()) { 134 if (pContext->IsMsgBoxEnabled()) {
135 CPDFDoc_Environment* pApp = pContext->GetReaderApp(); 135 CPDFDoc_Environment* pApp = pContext->GetReaderApp();
136 if (pApp) 136 if (pApp)
137 pApp->JS_appAlert(swMsg, NULL, 0, 3); 137 pApp->JS_appAlert(swMsg, NULL, 0, 3);
138 } 138 }
139 } 139 }
OLDNEW
« no previous file with comments | « fpdfsdk/include/javascript/JS_Object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698