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

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

Issue 2510823003: Move the message definitions to their own files. (Closed)
Patch Set: Created 4 years, 1 month 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_widgetmgr.cpp
diff --git a/xfa/fwl/core/cfwl_widgetmgr.cpp b/xfa/fwl/core/cfwl_widgetmgr.cpp
index 5ef17907aab00506df676ed49438fb69a431b65a..e3ebdeea410e7a88293a6c46350f5e885f39f447 100644
--- a/xfa/fwl/core/cfwl_widgetmgr.cpp
+++ b/xfa/fwl/core/cfwl_widgetmgr.cpp
@@ -6,7 +6,6 @@
#include "xfa/fwl/core/cfwl_widgetmgr.h"
-#include "xfa/fwl/core/cfwl_message.h"
#include "xfa/fwl/core/fwl_noteimp.h"
#include "xfa/fwl/core/ifwl_app.h"
#include "xfa/fwl/core/ifwl_form.h"
@@ -474,23 +473,17 @@ void CFWL_WidgetMgr::OnProcessMessageToForm(CFWL_Message* pMessage) {
if (!pNoteDriver)
return;
- if (IsThreadEnabled())
- pMessage = static_cast<CFWL_Message*>(pMessage->Clone());
+ auto pMsg = pMessage->Clone();
Tom Sepez 2016/11/16 21:34:02 nit: I might be tempted to write out std::unique_p
Tom Sepez 2016/11/16 21:34:02 nit: how about pClonedMessage as a name?
dsinclair 2016/11/16 21:41:07 Done.
dsinclair 2016/11/16 21:41:07 Done.
if (IsFormDisabled())
- pNoteDriver->ProcessMessage(pMessage);
+ pNoteDriver->ProcessMessage(pMsg.get());
else
- pNoteDriver->QueueMessage(pMessage);
+ pNoteDriver->QueueMessage(std::move(pMsg));
#if (_FX_OS_ == _FX_MACOSX_)
CFWL_NoteLoop* pTopLoop = pNoteDriver->GetTopLoop();
if (pTopLoop)
pNoteDriver->UnqueueMessage(pTopLoop);
#endif
-
- if (IsThreadEnabled())
- pMessage->Release();
-
- return;
}
void CFWL_WidgetMgr::OnDrawWidget(IFWL_Widget* pWidget,

Powered by Google App Engine
This is Rietveld 408576698