From 7adef41ed27ced7e18ee649a3d4f27a3cc00c51f Mon Sep 17 00:00:00 2001 From: dsinclair Date: Mon, 18 Apr 2016 06:49:02 -0700 Subject: Fold the FWL NoteThread classes up to the Thread classes. The NoteThread classes only contained one member and don't provide any added clarity. This CL moves the NoteDriver up to the Thread classes and removes the NoteThread classes. Review URL: https://codereview.chromium.org/1887703003 --- xfa/fwl/core/fwl_widgetimp.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'xfa/fwl/core/fwl_widgetimp.cpp') diff --git a/xfa/fwl/core/fwl_widgetimp.cpp b/xfa/fwl/core/fwl_widgetimp.cpp index 0f895eb5d2..ad75483fe4 100644 --- a/xfa/fwl/core/fwl_widgetimp.cpp +++ b/xfa/fwl/core/fwl_widgetimp.cpp @@ -134,7 +134,7 @@ FWL_ERR IFWL_Widget::SetDataProvider(IFWL_DataProvider* pDataProvider) { IFWL_WidgetDelegate* IFWL_Widget::SetDelegate(IFWL_WidgetDelegate* pDelegate) { return static_cast(GetImpl())->SetDelegate(pDelegate); } -IFWL_NoteThread* IFWL_Widget::GetOwnerThread() const { +IFWL_Thread* IFWL_Widget::GetOwnerThread() const { return static_cast(GetImpl())->GetOwnerThread(); } CFX_SizeF IFWL_Widget::GetOffsetFromParent(IFWL_Widget* pParent) { @@ -150,7 +150,7 @@ FWL_ERR CFWL_WidgetImp::Initialize() { IFWL_AdapterThreadMgr* pAdapterThread = pAdapter->GetThreadMgr(); if (!pAdapterThread) return FWL_ERR_Indefinite; - SetOwnerThread(static_cast( + SetOwnerThread(static_cast( pAdapterThread->GetCurrentThread()->GetImpl())); IFWL_Widget* pParent = m_pProperties->m_pParent; m_pWidgetMgr->InsertWidget(pParent, m_pInterface); @@ -497,10 +497,10 @@ IFWL_WidgetDelegate* CFWL_WidgetImp::SetDelegate( m_pCurDelegate = pDelegate; return pOldDelegate; } -IFWL_NoteThread* CFWL_WidgetImp::GetOwnerThread() const { - return static_cast(m_pOwnerThread->GetInterface()); +IFWL_Thread* CFWL_WidgetImp::GetOwnerThread() const { + return static_cast(m_pOwnerThread->GetInterface()); } -FWL_ERR CFWL_WidgetImp::SetOwnerThread(CFWL_NoteThreadImp* pOwnerThread) { +FWL_ERR CFWL_WidgetImp::SetOwnerThread(CFWL_ThreadImp* pOwnerThread) { m_pOwnerThread = pOwnerThread; return FWL_ERR_Succeeded; } @@ -682,7 +682,7 @@ void CFWL_WidgetImp::CalcTextRect(const CFX_WideString& wsText, void CFWL_WidgetImp::SetFocus(FX_BOOL bFocus) { if (m_pWidgetMgr->IsFormDisabled()) return; - IFWL_NoteThread* pThread = GetOwnerThread(); + IFWL_Thread* pThread = GetOwnerThread(); if (!pThread) return; CFWL_NoteDriver* pDriver = @@ -697,7 +697,7 @@ void CFWL_WidgetImp::SetFocus(FX_BOOL bFocus) { } } void CFWL_WidgetImp::SetGrab(FX_BOOL bSet) { - IFWL_NoteThread* pThread = GetOwnerThread(); + IFWL_Thread* pThread = GetOwnerThread(); if (!pThread) return; CFWL_NoteDriver* pDriver = @@ -813,7 +813,7 @@ FX_BOOL CFWL_WidgetImp::GetScreenSize(FX_FLOAT& fx, FX_FLOAT& fy) { } void CFWL_WidgetImp::RegisterEventTarget(IFWL_Widget* pEventSource, uint32_t dwFilter) { - IFWL_NoteThread* pThread = GetOwnerThread(); + IFWL_Thread* pThread = GetOwnerThread(); if (!pThread) return; IFWL_NoteDriver* pNoteDriver = pThread->GetNoteDriver(); @@ -822,7 +822,7 @@ void CFWL_WidgetImp::RegisterEventTarget(IFWL_Widget* pEventSource, pNoteDriver->RegisterEventTarget(m_pInterface, pEventSource, dwFilter); } void CFWL_WidgetImp::UnregisterEventTarget() { - IFWL_NoteThread* pThread = GetOwnerThread(); + IFWL_Thread* pThread = GetOwnerThread(); if (!pThread) return; IFWL_NoteDriver* pNoteDriver = pThread->GetNoteDriver(); @@ -847,7 +847,7 @@ void CFWL_WidgetImp::DispatchEvent(CFWL_Event* pEvent) { pDelegate->OnProcessEvent(pEvent); return; } - IFWL_NoteThread* pThread = GetOwnerThread(); + IFWL_Thread* pThread = GetOwnerThread(); if (!pThread) return; IFWL_NoteDriver* pNoteDriver = pThread->GetNoteDriver(); @@ -914,7 +914,7 @@ void CFWL_WidgetImp::DrawEdge(CFX_Graphics* pGraphics, pTheme->DrawBackground(¶m); } void CFWL_WidgetImp::NotifyDriver() { - IFWL_NoteThread* pThread = GetOwnerThread(); + IFWL_Thread* pThread = GetOwnerThread(); if (!pThread) return; CFWL_NoteDriver* pDriver = -- cgit v1.2.3