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

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

Issue 2510823003: Move the message definitions to their own files. (Closed)
Patch Set: Review feedback 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
« no previous file with comments | « xfa/fwl/core/cfwl_widgetmgr.h ('k') | xfa/fwl/core/fwl_noteimp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9172d7918af13e62f973161a5d300186a2af43af 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());
+ std::unique_ptr<CFWL_Message> pClonedMessage = pMessage->Clone();
if (IsFormDisabled())
- pNoteDriver->ProcessMessage(pMessage);
+ pNoteDriver->ProcessMessage(pClonedMessage.get());
else
- pNoteDriver->QueueMessage(pMessage);
+ pNoteDriver->QueueMessage(std::move(pClonedMessage));
#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,
« no previous file with comments | « xfa/fwl/core/cfwl_widgetmgr.h ('k') | xfa/fwl/core/fwl_noteimp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698