diff options
author | Ryan Harrison <rharrison@chromium.org> | 2017-09-18 14:23:18 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-18 18:40:16 +0000 |
commit | 275e260a6cd4a8e506ba974feb85ebcd926c1739 (patch) | |
tree | 2029b9158ec044764ceff122fe5fb5d0a3f123d1 /fxjs/fxjs_v8.h | |
parent | 450fbeaaabf1ab340c1018de2e58f1950657517e (diff) | |
download | pdfium-275e260a6cd4a8e506ba974feb85ebcd926c1739.tar.xz |
Convert string class names
Automated using git grep & sed.
Replace StringC classes with StringView classes.
Remove the CFX_ prefix and put string classes in fxcrt namespace.
Change AsStringC() to AsStringView().
Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*,
Foo).
Couple of tests needed to have their names regularlized.
BUG=pdfium:894
Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d
Reviewed-on: https://pdfium-review.googlesource.com/14151
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fxjs/fxjs_v8.h')
-rw-r--r-- | fxjs/fxjs_v8.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/fxjs/fxjs_v8.h b/fxjs/fxjs_v8.h index cdec942d4b..457843f387 100644 --- a/fxjs/fxjs_v8.h +++ b/fxjs/fxjs_v8.h @@ -174,7 +174,7 @@ class CFXJS_Engine { void ReleaseEngine(); // Called after FXJS_InitializeEngine call made. - int Execute(const CFX_WideString& script, FXJSErr* perror); + int Execute(const WideString& script, FXJSErr* perror); v8::Local<v8::Context> NewLocalContext(); v8::Local<v8::Context> GetPersistentContext(); @@ -186,15 +186,15 @@ class CFXJS_Engine { v8::Local<v8::Number> NewNumber(double number); v8::Local<v8::Number> NewNumber(float number); v8::Local<v8::Boolean> NewBoolean(bool b); - v8::Local<v8::String> NewString(const CFX_ByteStringC& str); - v8::Local<v8::String> NewString(const CFX_WideStringC& str); + v8::Local<v8::String> NewString(const ByteStringView& str); + v8::Local<v8::String> NewString(const WideStringView& str); v8::Local<v8::Date> NewDate(double d); v8::Local<v8::Object> NewFxDynamicObj(int nObjDefnID, bool bStatic = false); int ToInt32(v8::Local<v8::Value> pValue); bool ToBoolean(v8::Local<v8::Value> pValue); double ToDouble(v8::Local<v8::Value> pValue); - CFX_WideString ToWideString(v8::Local<v8::Value> pValue); + WideString ToWideString(v8::Local<v8::Value> pValue); v8::Local<v8::Object> ToObject(v8::Local<v8::Value> pValue); v8::Local<v8::Array> ToArray(v8::Local<v8::Value> pValue); @@ -207,12 +207,11 @@ class CFXJS_Engine { v8::Local<v8::Value> pValue); // Objects. - std::vector<CFX_WideString> GetObjectPropertyNames( - v8::Local<v8::Object> pObj); + std::vector<WideString> GetObjectPropertyNames(v8::Local<v8::Object> pObj); v8::Local<v8::Value> GetObjectProperty(v8::Local<v8::Object> pObj, - const CFX_WideString& PropertyName); + const WideString& PropertyName); void PutObjectProperty(v8::Local<v8::Object> pObj, - const CFX_WideString& PropertyName, + const WideString& PropertyName, v8::Local<v8::Value> pValue); // Native object binding. @@ -221,10 +220,10 @@ class CFXJS_Engine { static void FreeObjectPrivate(void* p); static void FreeObjectPrivate(v8::Local<v8::Object> pObj); - void SetConstArray(const CFX_WideString& name, v8::Local<v8::Array> array); - v8::Local<v8::Array> GetConstArray(const CFX_WideString& name); + void SetConstArray(const WideString& name, v8::Local<v8::Array> array); + v8::Local<v8::Array> GetConstArray(const WideString& name); - void Error(const CFX_WideString& message); + void Error(const WideString& message); protected: CFXJS_Engine(); @@ -235,7 +234,7 @@ class CFXJS_Engine { v8::Isolate* m_isolate; v8::Global<v8::Context> m_V8PersistentContext; std::vector<v8::Global<v8::Object>*> m_StaticObjects; - std::map<CFX_WideString, v8::Global<v8::Array>> m_ConstArrays; + std::map<WideString, v8::Global<v8::Array>> m_ConstArrays; }; #endif // FXJS_FXJS_V8_H_ |