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

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

Issue 2391313002: Rename CPDFSDK_Environment to CPDFSDK_FormfillEnvironment (Closed)
Patch Set: Rebase to master 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
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/JS_GlobalData.h" 7 #include "fpdfsdk/javascript/JS_GlobalData.h"
8 8
9 #include "core/fdrm/crypto/fx_crypt.h" 9 #include "core/fdrm/crypto/fx_crypt.h"
10 #include "third_party/base/stl_util.h" 10 #include "third_party/base/stl_util.h"
(...skipping 22 matching lines...) Expand all
33 sPropName->TrimLeft(); 33 sPropName->TrimLeft();
34 sPropName->TrimRight(); 34 sPropName->TrimRight();
35 return sPropName->GetLength() != 0; 35 return sPropName->GetLength() != 0;
36 } 36 }
37 37
38 CJS_GlobalData* g_pInstance = nullptr; 38 CJS_GlobalData* g_pInstance = nullptr;
39 39
40 } // namespace 40 } // namespace
41 41
42 // static 42 // static
43 CJS_GlobalData* CJS_GlobalData::GetRetainedInstance(CPDFSDK_Environment* pApp) { 43 CJS_GlobalData* CJS_GlobalData::GetRetainedInstance(
44 CPDFSDK_FormFillEnvironment* pApp) {
44 if (!g_pInstance) { 45 if (!g_pInstance) {
45 g_pInstance = new CJS_GlobalData(); 46 g_pInstance = new CJS_GlobalData();
46 } 47 }
47 ++g_pInstance->m_RefCount; 48 ++g_pInstance->m_RefCount;
48 return g_pInstance; 49 return g_pInstance;
49 } 50 }
50 51
51 void CJS_GlobalData::Release() { 52 void CJS_GlobalData::Release() {
52 if (!--m_RefCount) { 53 if (!--m_RefCount) {
53 delete g_pInstance; 54 delete g_pInstance;
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 case JS_GlobalDataType::NULLOBJ: { 386 case JS_GlobalDataType::NULLOBJ: {
386 uint32_t dwNameLen = (uint32_t)name.GetLength(); 387 uint32_t dwNameLen = (uint32_t)name.GetLength();
387 sData.AppendBlock(&dwNameLen, sizeof(uint32_t)); 388 sData.AppendBlock(&dwNameLen, sizeof(uint32_t));
388 sData.AppendString(name); 389 sData.AppendString(name);
389 sData.AppendBlock(&pData->nType, sizeof(uint32_t)); 390 sData.AppendBlock(&pData->nType, sizeof(uint32_t));
390 } break; 391 } break;
391 default: 392 default:
392 break; 393 break;
393 } 394 }
394 } 395 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698