summaryrefslogtreecommitdiff
path: root/fxjs/cjs_eventhandler.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-05-07 14:37:55 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-07 14:37:55 +0000
commit15406fb41d7aa5ab685005e51ff3cf54acb9a15e (patch)
tree1342c6fa02cbae568824c7e52db1f9f8e8fab3f3 /fxjs/cjs_eventhandler.h
parentef755ea5d5e8fbbd9f6a9d2494960744d8607a46 (diff)
downloadpdfium-15406fb41d7aa5ab685005e51ff3cf54acb9a15e.tar.xz
Mark parts of CJS_EventHandler as private.
Also change Initial() to Initialize(). Change-Id: Ic63ee1cace0012ad570db25447ced752bddd7f86 Reviewed-on: https://pdfium-review.googlesource.com/28150 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/cjs_eventhandler.h')
-rw-r--r--fxjs/cjs_eventhandler.h42
1 files changed, 26 insertions, 16 deletions
diff --git a/fxjs/cjs_eventhandler.h b/fxjs/cjs_eventhandler.h
index 4087355405..aa02895924 100644
--- a/fxjs/cjs_eventhandler.h
+++ b/fxjs/cjs_eventhandler.h
@@ -140,7 +140,6 @@ class CJS_EventHandler {
void OnConsole_Exec();
void OnExternal_Exec();
- void Initial(JS_EVENT_T type);
void Destroy();
bool IsValid() const;
@@ -166,28 +165,39 @@ class CJS_EventHandler {
JS_EVENT_T EventType() const { return m_eEventType; }
+ void SetRCForTest(bool* pRC) { m_pbRc = pRC; }
+
+ void SetStrChangeForTest(WideString* pStrChange) {
+ m_pWideStrChange = pStrChange;
+ }
+
+ void ResetWillCommitForTest() { m_bWillCommit = false; }
+
+ UnownedPtr<WideString> m_pValue;
+
+ private:
+ void Initialize(JS_EVENT_T type);
UnownedPtr<CJS_EventContext> const m_pJSEventContext;
- JS_EVENT_T m_eEventType;
- bool m_bValid;
+ JS_EVENT_T m_eEventType = JET_UNKNOWN;
+ bool m_bValid = false;
WideString m_strTargetName;
WideString m_strSourceName;
UnownedPtr<WideString> m_pWideStrChange;
WideString m_WideStrChangeDu;
WideString m_WideStrChangeEx;
- int m_nCommitKey;
- bool m_bKeyDown;
- bool m_bModifier;
- bool m_bShift;
- int* m_pISelEnd;
- int m_nSelEndDu;
- int* m_pISelStart;
- int m_nSelStartDu;
- bool m_bWillCommit;
- UnownedPtr<WideString> m_pValue;
- bool m_bFieldFull;
- bool* m_pbRc;
- bool m_bRcDu;
+ int m_nCommitKey = -1;
+ bool m_bKeyDown = false;
+ bool m_bModifier = false;
+ bool m_bShift = false;
+ int* m_pISelEnd = nullptr;
+ int m_nSelEndDu = 0;
+ int* m_pISelStart = nullptr;
+ int m_nSelStartDu = 0;
+ bool m_bWillCommit = false;
+ bool m_bFieldFull = false;
+ bool* m_pbRc = nullptr;
+ bool m_bRcDu = false;
UnownedPtr<CPDF_Bookmark> m_pTargetBookMark;
CPDFSDK_FormFillEnvironment::ObservedPtr m_pTargetFormFillEnv;