diff options
author | weili <weili@chromium.org> | 2016-07-20 10:35:31 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-20 10:35:31 -0700 |
commit | 47228aceb86744f858ab8bfa98f3f8b62054dfae (patch) | |
tree | d5d8abbc5eaeb23b291cf604bf33c77cf648b0bb /fpdfsdk/javascript/global.h | |
parent | 31f8740fe51ceca8e973a2efe40d4d440d7a5cb7 (diff) | |
download | pdfium-47228aceb86744f858ab8bfa98f3f8b62054dfae.tar.xz |
Clean up singleton implementation
Move the singleton instances into their namespaces, and use
get()/getInstance() for uniform accesses.
Review-Url: https://codereview.chromium.org/2154843002
Diffstat (limited to 'fpdfsdk/javascript/global.h')
-rw-r--r-- | fpdfsdk/javascript/global.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fpdfsdk/javascript/global.h b/fpdfsdk/javascript/global.h index eca9aa12d1..6604d9bad8 100644 --- a/fpdfsdk/javascript/global.h +++ b/fpdfsdk/javascript/global.h @@ -11,6 +11,7 @@ #include <vector> #include "fpdfsdk/javascript/JS_Define.h" +#include "fpdfsdk/javascript/JS_KeyValue.h" class CJS_GlobalData; class CJS_GlobalVariableArray; @@ -20,7 +21,7 @@ struct JSGlobalData { JSGlobalData(); ~JSGlobalData(); - int nType; // 0:int 1:bool 2:string 3:obj + JS_GlobalDataType nType; double dData; bool bData; CFX_ByteString sData; @@ -53,7 +54,7 @@ class JSGlobalAlternate : public CJS_EmbedObj { void CommitGlobalPersisitentVariables(IJS_Context* cc); void DestroyGlobalPersisitentVariables(); FX_BOOL SetGlobalVariables(const CFX_ByteString& propname, - int nType, + JS_GlobalDataType nType, double dData, bool bData, const CFX_ByteString& sData, |