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

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

Issue 1928963004: Cleanup IFWL_Adapter interfaces. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months 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/fwl_formimp.cpp
diff --git a/xfa/fwl/core/fwl_formimp.cpp b/xfa/fwl/core/fwl_formimp.cpp
index 815aca974c6c499593145c338f0dee1b60ba456a..37a9dabbad5ec49d4f3d702f52b264ec667959a3 100644
--- a/xfa/fwl/core/fwl_formimp.cpp
+++ b/xfa/fwl/core/fwl_formimp.cpp
@@ -16,7 +16,6 @@
#include "xfa/fwl/core/fwl_noteimp.h"
#include "xfa/fwl/core/fwl_widgetimp.h"
#include "xfa/fwl/core/fwl_widgetmgrimp.h"
-#include "xfa/fwl/core/ifwl_adapterwidgetmgr.h"
#include "xfa/fwl/core/ifwl_app.h"
#include "xfa/fwl/core/ifwl_themeprovider.h"
#include "xfa/fwl/theme/cfwl_widgettp.h"
@@ -151,7 +150,8 @@ FWL_ERR CFWL_FormImp::GetClientRect(CFX_RectF& rect) {
CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr());
if (!pWidgetMgr)
return FWL_ERR_Indefinite;
- IFWL_AdapterWidgetMgr* adapterWidgetMgr = pWidgetMgr->GetAdapterWidgetMgr();
+ CXFA_FWLAdapterWidgetMgr* adapterWidgetMgr =
+ pWidgetMgr->GetAdapterWidgetMgr();
FX_FLOAT l, t, r, b;
l = t = r = b = 0;
adapterWidgetMgr->GetSystemBorder(l, t, r, b);
@@ -466,7 +466,6 @@ void CFWL_FormImp::ShowChildWidget(IFWL_Widget* pParent) {
IFWL_Widget* pChild =
pWidgetMgr->GetWidget(pParent, FWL_WGTRELATION_FirstChild);
while (pChild) {
- pWidgetMgr->ShowWidget_Native(pChild);
ShowChildWidget(pChild);
pChild = pWidgetMgr->GetWidget(pChild, FWL_WGTRELATION_NextSibling);
}
@@ -639,7 +638,6 @@ void CFWL_FormImp::SetWorkAreaRect() {
if (!pWidgetMgr)
return;
m_bSetMaximize = TRUE;
- pWidgetMgr->SetMaximize_Native(m_pInterface);
Repaint(&m_rtRelative);
}
void CFWL_FormImp::SetCursor(FX_FLOAT fx, FX_FLOAT fy) {}
@@ -792,14 +790,10 @@ void CFWL_FormImp::UpdateIcon() {
static_cast<IFWL_FormDP*>(m_pProperties->m_pDataProvider);
CFX_DIBitmap* pBigIcon = pData->GetIcon(m_pInterface, TRUE);
CFX_DIBitmap* pSmallIcon = pData->GetIcon(m_pInterface, FALSE);
- if (pBigIcon && pBigIcon != m_pBigIcon) {
+ if (pBigIcon && pBigIcon != m_pBigIcon)
Tom Sepez 2016/04/28 16:42:11 The second part of the && seems redundant, do we c
dsinclair 2016/04/28 17:53:45 I guess it was guarding the _Native calls. Removed
m_pBigIcon = pBigIcon;
- pWidgetMgr->SetWidgetIcon_Native(m_pInterface, m_pBigIcon, TRUE);
- }
- if (pSmallIcon && pSmallIcon != m_pSmallIcon) {
+ if (pSmallIcon && pSmallIcon != m_pSmallIcon)
m_pSmallIcon = pSmallIcon;
- pWidgetMgr->SetWidgetIcon_Native(m_pInterface, m_pBigIcon, FALSE);
- }
}
void CFWL_FormImp::UpdateCaption() {
CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr());
@@ -811,7 +805,6 @@ void CFWL_FormImp::UpdateCaption() {
return;
CFX_WideString text;
pData->GetCaption(m_pInterface, text);
- pWidgetMgr->SetWidgetCaption_Native(m_pInterface, text.AsStringC());
}
void CFWL_FormImp::DoWidthLimit(FX_FLOAT& fLeft,
FX_FLOAT& fWidth,
@@ -970,7 +963,6 @@ int32_t CFWL_FormImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
m_pOwner->m_bSetMaximize = FALSE;
CFWL_MsgSize* pMsg = static_cast<CFWL_MsgSize*>(pMessage);
CFX_RectF rt;
- pWidgetMgr->GetWidgetRect_Native(m_pOwner->m_pInterface, rt);
m_pOwner->m_pProperties->m_rtWidget.left = rt.left;
m_pOwner->m_pProperties->m_rtWidget.top = rt.top;
m_pOwner->m_pProperties->m_rtWidget.width = (FX_FLOAT)pMsg->m_iWidth;
@@ -1055,13 +1047,7 @@ void CFWL_FormImpDelegate::OnLButtonUp(CFWL_MsgMouse* pMsg) {
m_pOwner->Update();
}
m_pOwner->m_bMaximized = !m_pOwner->m_bMaximized;
- } else if (pPressedBtn == m_pOwner->m_pMinBox) {
- CFWL_WidgetMgr* pWidgetMgr =
- static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr());
- if (!pWidgetMgr)
- return;
- pWidgetMgr->SetMinimize_Native(m_pOwner->m_pInterface);
- } else {
+ } else if (pPressedBtn != m_pOwner->m_pMinBox) {
CFWL_EvtClose eClose;
eClose.m_pSrcTarget = m_pOwner->m_pInterface;
m_pOwner->DispatchEvent(&eClose);

Powered by Google App Engine
This is Rietveld 408576698