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

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

Issue 2436103002: Remove FWL globals. (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/ifwl_listbox.h ('k') | xfa/fwl/core/ifwl_monthcalendar.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/ifwl_listbox.cpp
diff --git a/xfa/fwl/core/ifwl_listbox.cpp b/xfa/fwl/core/ifwl_listbox.cpp
index bb6d86d384d770a80670f01cd11de375b5b0e2b6..05cc64bb90ebbfc1a4a48031c3ac8eb5d2d17c03 100644
--- a/xfa/fwl/core/ifwl_listbox.cpp
+++ b/xfa/fwl/core/ifwl_listbox.cpp
@@ -20,9 +20,10 @@ const int kItemTextMargin = 2;
} // namespace
-IFWL_ListBox::IFWL_ListBox(const CFWL_WidgetImpProperties& properties,
+IFWL_ListBox::IFWL_ListBox(const IFWL_App* app,
+ const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
- : IFWL_Widget(properties, pOuter),
+ : IFWL_Widget(app, properties, pOuter),
m_dwTTOStyles(0),
m_iTTOAligns(0),
m_hAnchor(nullptr),
@@ -36,16 +37,9 @@ IFWL_ListBox::IFWL_ListBox(const CFWL_WidgetImpProperties& properties,
IFWL_ListBox::~IFWL_ListBox() {}
-FWL_Type IFWL_ListBox::GetClassID() const {
- return FWL_Type::ListBox;
-}
-
-FWL_Error IFWL_ListBox::Initialize() {
- if (IFWL_Widget::Initialize() != FWL_Error::Succeeded)
- return FWL_Error::Indefinite;
-
+void IFWL_ListBox::Initialize() {
+ IFWL_Widget::Initialize();
m_pDelegate = new CFWL_ListBoxImpDelegate(this);
- return FWL_Error::Succeeded;
}
void IFWL_ListBox::Finalize() {
@@ -59,6 +53,10 @@ void IFWL_ListBox::Finalize() {
IFWL_Widget::Finalize();
}
+FWL_Type IFWL_ListBox::GetClassID() const {
+ return FWL_Type::ListBox;
+}
+
FWL_Error IFWL_ListBox::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) {
if (bAutoSize) {
rect.Set(0, 0, 0, 0);
@@ -898,7 +896,7 @@ void IFWL_ListBox::InitScrollBar(FX_BOOL bVert) {
prop.m_dwStates = FWL_WGTSTATE_Invisible;
prop.m_pParent = this;
prop.m_pThemeProvider = m_pScrollBarTP;
- IFWL_ScrollBar* pScrollBar = new IFWL_ScrollBar(prop, this);
+ IFWL_ScrollBar* pScrollBar = new IFWL_ScrollBar(m_pOwnerApp, prop, this);
pScrollBar->Initialize();
(bVert ? &m_pVertScrollBar : &m_pHorzScrollBar)->reset(pScrollBar);
}
« no previous file with comments | « xfa/fwl/core/ifwl_listbox.h ('k') | xfa/fwl/core/ifwl_monthcalendar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698