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

Side by Side Diff: xfa/fwl/core/ifwl_combolist.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 unified diff | Download patch
« no previous file with comments | « xfa/fwl/core/ifwl_combolist.h ('k') | xfa/fwl/core/ifwl_dataprovider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fwl/core/ifwl_combolist.h" 7 #include "xfa/fwl/core/ifwl_combolist.h"
8 8
9 #include "xfa/fwl/core/ifwl_combobox.h" 9 #include "xfa/fwl/core/ifwl_combobox.h"
10 #include "xfa/fwl/core/ifwl_comboedit.h" 10 #include "xfa/fwl/core/ifwl_comboedit.h"
11 11
12 IFWL_ComboList::IFWL_ComboList(const CFWL_WidgetImpProperties& properties, 12 IFWL_ComboList::IFWL_ComboList(const IFWL_App* app,
13 const CFWL_WidgetImpProperties& properties,
13 IFWL_Widget* pOuter) 14 IFWL_Widget* pOuter)
14 : IFWL_ListBox(properties, pOuter), m_bNotifyOwner(TRUE) { 15 : IFWL_ListBox(app, properties, pOuter), m_bNotifyOwner(TRUE) {
15 ASSERT(pOuter); 16 ASSERT(pOuter);
16 } 17 }
17 18
18 FWL_Error IFWL_ComboList::Initialize() { 19 void IFWL_ComboList::Initialize() {
19 if (IFWL_ListBox::Initialize() != FWL_Error::Succeeded) 20 IFWL_ListBox::Initialize();
20 return FWL_Error::Indefinite; 21
22 // Delete the delegate that was created by IFWL_ListBox::Initialize ...
21 delete m_pDelegate; 23 delete m_pDelegate;
22 m_pDelegate = new CFWL_ComboListImpDelegate(this); 24 m_pDelegate = new CFWL_ComboListImpDelegate(this);
23 return FWL_Error::Succeeded;
24 } 25 }
25 26
26 void IFWL_ComboList::Finalize() { 27 void IFWL_ComboList::Finalize() {
27 delete m_pDelegate; 28 delete m_pDelegate;
28 m_pDelegate = nullptr; 29 m_pDelegate = nullptr;
29 IFWL_ListBox::Finalize(); 30 IFWL_ListBox::Finalize();
30 } 31 }
31 32
32 int32_t IFWL_ComboList::MatchItem(const CFX_WideString& wsMatch) { 33 int32_t IFWL_ComboList::MatchItem(const CFX_WideString& wsMatch) {
33 if (wsMatch.IsEmpty()) { 34 if (wsMatch.IsEmpty()) {
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 CFX_RectF rtInvalidate; 283 CFX_RectF rtInvalidate;
283 rtInvalidate.Set(0, 0, m_pOwner->m_pProperties->m_rtWidget.width, 284 rtInvalidate.Set(0, 0, m_pOwner->m_pProperties->m_rtWidget.width,
284 m_pOwner->m_pProperties->m_rtWidget.height); 285 m_pOwner->m_pProperties->m_rtWidget.height);
285 m_pOwner->Repaint(&rtInvalidate); 286 m_pOwner->Repaint(&rtInvalidate);
286 break; 287 break;
287 } 288 }
288 default: 289 default:
289 break; 290 break;
290 } 291 }
291 } 292 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/ifwl_combolist.h ('k') | xfa/fwl/core/ifwl_dataprovider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698