From fae5e26d983848089e35e2b53e9da24036661b08 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 20 Nov 2017 19:58:13 +0000 Subject: Make some CJS_EventHandler methods const. Change-Id: Ie95b6a4c2613b5e110d2dd1244dd4a87375f624f Reviewed-on: https://pdfium-review.googlesource.com/18750 Reviewed-by: Ryan Harrison Commit-Queue: Lei Zhang --- fxjs/cjs_eventhandler.h | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'fxjs/cjs_eventhandler.h') diff --git a/fxjs/cjs_eventhandler.h b/fxjs/cjs_eventhandler.h index cb7b3c09b1..87ce1dcca0 100644 --- a/fxjs/cjs_eventhandler.h +++ b/fxjs/cjs_eventhandler.h @@ -142,27 +142,29 @@ class CJS_EventHandler { void Initial(JS_EVENT_T type); void Destroy(); - bool IsValid(); + bool IsValid() const; WideString& Change(); - WideString ChangeEx(); - int CommitKey(); - bool FieldFull(); - bool KeyDown(); - bool Modifier(); - const wchar_t* Name(); - const wchar_t* Type(); + const WideString& ChangeEx(); + int CommitKey() const; + bool FieldFull() const; + bool KeyDown() const; + bool Modifier() const; + const wchar_t* Name() const; + const wchar_t* Type() const; bool& Rc(); - int& SelEnd(); - int& SelStart(); - bool Shift(); + int SelEnd() const; + int SelStart() const; + void SetSelEnd(int value); + void SetSelStart(int value); + bool Shift() const; Field* Source(); Field* Target_Field(); WideString& Value(); - bool WillCommit(); - WideString TargetName(); + bool WillCommit() const; + const WideString& TargetName() const; - JS_EVENT_T EventType() { return m_eEventType; } + JS_EVENT_T EventType() const { return m_eEventType; } UnownedPtr const m_pJSEventContext; JS_EVENT_T m_eEventType; -- cgit v1.2.3