diff options
author | dsinclair <dsinclair@chromium.org> | 2016-11-16 14:25:01 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-16 14:25:01 -0800 |
commit | 242b95e2a9df3b57dd9aa28adea58ad51f84a221 (patch) | |
tree | 001948a117ff48e77af6351c505a9e41951d7a4e /xfa/fwl/core/cfwl_widgetmgr.cpp | |
parent | 058d2d6b7851b77a371bb4d37d5da1148794397a (diff) | |
download | pdfium-242b95e2a9df3b57dd9aa28adea58ad51f84a221.tar.xz |
Move the message definitions to their own files.chromium/2923
Currently the CFWL messages are created by a macro in the CFWL_Message header
file. This Cl splits out the class to their own files and writes them directly
instead of using the macro.
Review-Url: https://codereview.chromium.org/2510823003
Diffstat (limited to 'xfa/fwl/core/cfwl_widgetmgr.cpp')
-rw-r--r-- | xfa/fwl/core/cfwl_widgetmgr.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/xfa/fwl/core/cfwl_widgetmgr.cpp b/xfa/fwl/core/cfwl_widgetmgr.cpp index 5ef17907aa..9172d7918a 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, |