summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/cjs_context.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-11-02 14:37:54 -0700
committerCommit bot <commit-bot@chromium.org>2016-11-02 14:37:55 -0700
commit4cf551577856f89103e162edc761def44ffb96fc (patch)
tree452684db6c2dd2b9aa697415ff4b752e59123b77 /fpdfsdk/javascript/cjs_context.cpp
parent66bd67023f747c489d7144aaf4ca6222c686cd26 (diff)
downloadpdfium-4cf551577856f89103e162edc761def44ffb96fc.tar.xz
Remove FX_BOOL from fpdfsdk.
Review-Url: https://codereview.chromium.org/2453683011
Diffstat (limited to 'fpdfsdk/javascript/cjs_context.cpp')
-rw-r--r--fpdfsdk/javascript/cjs_context.cpp102
1 files changed, 51 insertions, 51 deletions
diff --git a/fpdfsdk/javascript/cjs_context.cpp b/fpdfsdk/javascript/cjs_context.cpp
index 0a34b353b5..e356bdd904 100644
--- a/fpdfsdk/javascript/cjs_context.cpp
+++ b/fpdfsdk/javascript/cjs_context.cpp
@@ -13,7 +13,7 @@
CJS_Context::CJS_Context(CJS_Runtime* pRuntime)
: m_pRuntime(pRuntime),
m_pEventHandler(new CJS_EventHandler(this)),
- m_bBusy(FALSE) {}
+ m_bBusy(false) {}
CJS_Context::~CJS_Context() {}
@@ -21,8 +21,8 @@ CPDFSDK_FormFillEnvironment* CJS_Context::GetFormFillEnv() {
return m_pRuntime->GetFormFillEnv();
}
-FX_BOOL CJS_Context::RunScript(const CFX_WideString& script,
- CFX_WideString* info) {
+bool CJS_Context::RunScript(const CFX_WideString& script,
+ CFX_WideString* info) {
v8::Isolate::Scope isolate_scope(m_pRuntime->GetIsolate());
v8::HandleScope handle_scope(m_pRuntime->GetIsolate());
v8::Local<v8::Context> context = m_pRuntime->NewLocalContext();
@@ -30,16 +30,16 @@ FX_BOOL CJS_Context::RunScript(const CFX_WideString& script,
if (m_bBusy) {
*info = JSGetStringFromID(IDS_STRING_JSBUSY);
- return FALSE;
+ return false;
}
- m_bBusy = TRUE;
+ m_bBusy = true;
ASSERT(m_pEventHandler->IsValid());
CJS_Runtime::FieldEvent event(m_pEventHandler->TargetName(),
m_pEventHandler->EventType());
if (!m_pRuntime->AddEventToSet(event)) {
*info = JSGetStringFromID(IDS_STRING_JSEVENT);
- return FALSE;
+ return false;
}
CFX_WideString sErrorMessage;
@@ -56,7 +56,7 @@ FX_BOOL CJS_Context::RunScript(const CFX_WideString& script,
m_pRuntime->RemoveEventFromSet(event);
m_pEventHandler->Destroy();
- m_bBusy = FALSE;
+ m_bBusy = false;
return nRet >= 0;
}
@@ -106,39 +106,39 @@ void CJS_Context::OnPage_OutView(CPDFSDK_FormFillEnvironment* pFormFillEnv) {
m_pEventHandler->OnPage_OutView(pFormFillEnv);
}
-void CJS_Context::OnField_MouseDown(FX_BOOL bModifier,
- FX_BOOL bShift,
+void CJS_Context::OnField_MouseDown(bool bModifier,
+ bool bShift,
CPDF_FormField* pTarget) {
m_pEventHandler->OnField_MouseDown(bModifier, bShift, pTarget);
}
-void CJS_Context::OnField_MouseEnter(FX_BOOL bModifier,
- FX_BOOL bShift,
+void CJS_Context::OnField_MouseEnter(bool bModifier,
+ bool bShift,
CPDF_FormField* pTarget) {
m_pEventHandler->OnField_MouseEnter(bModifier, bShift, pTarget);
}
-void CJS_Context::OnField_MouseExit(FX_BOOL bModifier,
- FX_BOOL bShift,
+void CJS_Context::OnField_MouseExit(bool bModifier,
+ bool bShift,
CPDF_FormField* pTarget) {
m_pEventHandler->OnField_MouseExit(bModifier, bShift, pTarget);
}
-void CJS_Context::OnField_MouseUp(FX_BOOL bModifier,
- FX_BOOL bShift,
+void CJS_Context::OnField_MouseUp(bool bModifier,
+ bool bShift,
CPDF_FormField* pTarget) {
m_pEventHandler->OnField_MouseUp(bModifier, bShift, pTarget);
}
-void CJS_Context::OnField_Focus(FX_BOOL bModifier,
- FX_BOOL bShift,
+void CJS_Context::OnField_Focus(bool bModifier,
+ bool bShift,
CPDF_FormField* pTarget,
const CFX_WideString& Value) {
m_pEventHandler->OnField_Focus(bModifier, bShift, pTarget, Value);
}
-void CJS_Context::OnField_Blur(FX_BOOL bModifier,
- FX_BOOL bShift,
+void CJS_Context::OnField_Blur(bool bModifier,
+ bool bShift,
CPDF_FormField* pTarget,
const CFX_WideString& Value) {
m_pEventHandler->OnField_Blur(bModifier, bShift, pTarget, Value);
@@ -147,28 +147,28 @@ void CJS_Context::OnField_Blur(FX_BOOL bModifier,
void CJS_Context::OnField_Calculate(CPDF_FormField* pSource,
CPDF_FormField* pTarget,
CFX_WideString& Value,
- FX_BOOL& bRc) {
+ bool& bRc) {
m_pEventHandler->OnField_Calculate(pSource, pTarget, Value, bRc);
}
void CJS_Context::OnField_Format(CPDF_FormField* pTarget,
CFX_WideString& Value,
- FX_BOOL bWillCommit) {
+ bool bWillCommit) {
m_pEventHandler->OnField_Format(pTarget, Value, bWillCommit);
}
void CJS_Context::OnField_Keystroke(CFX_WideString& strChange,
const CFX_WideString& strChangeEx,
- FX_BOOL bKeyDown,
- FX_BOOL bModifier,
+ bool bKeyDown,
+ bool bModifier,
int& nSelEnd,
int& nSelStart,
- FX_BOOL bShift,
+ bool bShift,
CPDF_FormField* pTarget,
CFX_WideString& Value,
- FX_BOOL bWillCommit,
- FX_BOOL bFieldFull,
- FX_BOOL& bRc) {
+ bool bWillCommit,
+ bool bFieldFull,
+ bool& bRc) {
m_pEventHandler->OnField_Keystroke(
strChange, strChangeEx, bKeyDown, bModifier, nSelEnd, nSelStart, bShift,
pTarget, Value, bWillCommit, bFieldFull, bRc);
@@ -176,72 +176,72 @@ void CJS_Context::OnField_Keystroke(CFX_WideString& strChange,
void CJS_Context::OnField_Validate(CFX_WideString& strChange,
const CFX_WideString& strChangeEx,
- FX_BOOL bKeyDown,
- FX_BOOL bModifier,
- FX_BOOL bShift,
+ bool bKeyDown,
+ bool bModifier,
+ bool bShift,
CPDF_FormField* pTarget,
CFX_WideString& Value,
- FX_BOOL& bRc) {
+ bool& bRc) {
m_pEventHandler->OnField_Validate(strChange, strChangeEx, bKeyDown, bModifier,
bShift, pTarget, Value, bRc);
}
-void CJS_Context::OnScreen_Focus(FX_BOOL bModifier,
- FX_BOOL bShift,
+void CJS_Context::OnScreen_Focus(bool bModifier,
+ bool bShift,
CPDFSDK_Annot* pScreen) {
m_pEventHandler->OnScreen_Focus(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_Blur(FX_BOOL bModifier,
- FX_BOOL bShift,
+void CJS_Context::OnScreen_Blur(bool bModifier,
+ bool bShift,
CPDFSDK_Annot* pScreen) {
m_pEventHandler->OnScreen_Blur(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_Open(FX_BOOL bModifier,
- FX_BOOL bShift,
+void CJS_Context::OnScreen_Open(bool bModifier,
+ bool bShift,
CPDFSDK_Annot* pScreen) {
m_pEventHandler->OnScreen_Open(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_Close(FX_BOOL bModifier,
- FX_BOOL bShift,
+void CJS_Context::OnScreen_Close(bool bModifier,
+ bool bShift,
CPDFSDK_Annot* pScreen) {
m_pEventHandler->OnScreen_Close(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_MouseDown(FX_BOOL bModifier,
- FX_BOOL bShift,
+void CJS_Context::OnScreen_MouseDown(bool bModifier,
+ bool bShift,
CPDFSDK_Annot* pScreen) {
m_pEventHandler->OnScreen_MouseDown(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_MouseUp(FX_BOOL bModifier,
- FX_BOOL bShift,
+void CJS_Context::OnScreen_MouseUp(bool bModifier,
+ bool bShift,
CPDFSDK_Annot* pScreen) {
m_pEventHandler->OnScreen_MouseUp(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_MouseEnter(FX_BOOL bModifier,
- FX_BOOL bShift,
+void CJS_Context::OnScreen_MouseEnter(bool bModifier,
+ bool bShift,
CPDFSDK_Annot* pScreen) {
m_pEventHandler->OnScreen_MouseEnter(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_MouseExit(FX_BOOL bModifier,
- FX_BOOL bShift,
+void CJS_Context::OnScreen_MouseExit(bool bModifier,
+ bool bShift,
CPDFSDK_Annot* pScreen) {
m_pEventHandler->OnScreen_MouseExit(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_InView(FX_BOOL bModifier,
- FX_BOOL bShift,
+void CJS_Context::OnScreen_InView(bool bModifier,
+ bool bShift,
CPDFSDK_Annot* pScreen) {
m_pEventHandler->OnScreen_InView(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_OutView(FX_BOOL bModifier,
- FX_BOOL bShift,
+void CJS_Context::OnScreen_OutView(bool bModifier,
+ bool bShift,
CPDFSDK_Annot* pScreen) {
m_pEventHandler->OnScreen_OutView(bModifier, bShift, pScreen);
}