Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Unified Diff: xfa/fwl/core/cfwl_form.cpp

Issue 2530993002: Cleanup FWL Event and Message code. (Closed)
Patch Set: Review feedback Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: xfa/fwl/core/cfwl_form.cpp
diff --git a/xfa/fwl/core/cfwl_form.cpp b/xfa/fwl/core/cfwl_form.cpp
index 4eec16390010b69524554934f58f8081f30ee301..00d47d410038764a41610b2604b85a6403d8c767 100644
--- a/xfa/fwl/core/cfwl_form.cpp
+++ b/xfa/fwl/core/cfwl_form.cpp
@@ -11,7 +11,7 @@
#include "third_party/base/ptr_util.h"
#include "xfa/fde/tto/fde_textout.h"
#include "xfa/fwl/core/cfwl_app.h"
-#include "xfa/fwl/core/cfwl_evtclose.h"
+#include "xfa/fwl/core/cfwl_event.h"
#include "xfa/fwl/core/cfwl_formproxy.h"
#include "xfa/fwl/core/cfwl_msgmouse.h"
#include "xfa/fwl/core/cfwl_notedriver.h"
@@ -487,8 +487,8 @@ void CFWL_Form::OnProcessMessage(CFWL_Message* pMessage) {
if (!pMessage)
return;
- switch (pMessage->GetClassID()) {
- case CFWL_MessageType::Mouse: {
+ switch (pMessage->GetType()) {
+ case CFWL_Message::Type::Mouse: {
CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage);
switch (pMsg->m_dwCmd) {
case FWL_MouseCommand::LeftButtonDown:
@@ -556,8 +556,7 @@ void CFWL_Form::OnLButtonUp(CFWL_MsgMouse* pMsg) {
}
m_bMaximized = !m_bMaximized;
} else if (pPressedBtn != m_pMinBox) {
- CFWL_EvtClose eClose;
- eClose.m_pSrcTarget = this;
+ CFWL_Event eClose(CFWL_Event::Type::Close, this);
DispatchEvent(&eClose);
}
}

Powered by Google App Engine
This is Rietveld 408576698