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

Side by Side Diff: fpdfsdk/javascript/JS_KeyValue.h

Issue 2154843002: Clean up singleton implementation (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 5 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_GlobalData.cpp ('k') | fpdfsdk/javascript/JS_KeyValue.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef FPDFSDK_JAVASCRIPT_JS_KEYVALUE_H_
8 #define FPDFSDK_JAVASCRIPT_JS_KEYVALUE_H_
9
10 #include <memory>
11 #include <vector>
12
13 #include "core/fxcrt/include/fx_basic.h"
14
15 enum class JS_GlobalDataType { NUMBER = 0, BOOLEAN, STRING, OBJECT, NULLOBJ };
16
17 class CJS_KeyValue;
18
19 class CJS_GlobalVariableArray {
20 public:
21 CJS_GlobalVariableArray();
22 ~CJS_GlobalVariableArray();
23
24 void Add(CJS_KeyValue* p);
25 int Count() const;
26 CJS_KeyValue* GetAt(int index) const;
27 void Copy(const CJS_GlobalVariableArray& array);
28
29 private:
30 std::vector<std::unique_ptr<CJS_KeyValue>> m_Array;
31 };
32
33 class CJS_KeyValue {
34 public:
35 CJS_KeyValue();
36 ~CJS_KeyValue();
37
38 CFX_ByteString sKey;
39 JS_GlobalDataType nType;
40 double dData;
41 bool bData;
42 CFX_ByteString sData;
43 CJS_GlobalVariableArray objData;
44 };
45
46 #endif // FPDFSDK_JAVASCRIPT_JS_KEYVALUE_H_
OLDNEW
« no previous file with comments | « fpdfsdk/javascript/JS_GlobalData.cpp ('k') | fpdfsdk/javascript/JS_KeyValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698