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

Side by Side Diff: xfa/fwl/lightwidget/cfwl_combobox.cpp

Issue 2422303003: Remove FWL Create methods, use new instead (Closed)
Patch Set: Review fixes Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_combobox.h ('k') | xfa/fwl/lightwidget/cfwl_datetimepicker.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 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 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/lightwidget/cfwl_combobox.h" 7 #include "xfa/fwl/lightwidget/cfwl_combobox.h"
8 8
9 #include <utility> 9 #include <utility>
10 10
11 #include "xfa/fwl/core/fwl_error.h" 11 #include "xfa/fwl/core/fwl_error.h"
12 #include "xfa/fwl/core/ifwl_widget.h" 12 #include "xfa/fwl/core/ifwl_widget.h"
13 13
14 IFWL_ComboBox* CFWL_ComboBox::GetWidget() { 14 IFWL_ComboBox* CFWL_ComboBox::GetWidget() {
15 return static_cast<IFWL_ComboBox*>(m_pIface.get()); 15 return static_cast<IFWL_ComboBox*>(m_pIface.get());
16 } 16 }
17 17
18 const IFWL_ComboBox* CFWL_ComboBox::GetWidget() const { 18 const IFWL_ComboBox* CFWL_ComboBox::GetWidget() const {
19 return static_cast<IFWL_ComboBox*>(m_pIface.get()); 19 return static_cast<IFWL_ComboBox*>(m_pIface.get());
20 } 20 }
21 21
22 CFWL_ComboBox* CFWL_ComboBox::Create() {
23 return new CFWL_ComboBox;
24 }
25
26 FWL_Error CFWL_ComboBox::Initialize(const CFWL_WidgetProperties* pProperties) { 22 FWL_Error CFWL_ComboBox::Initialize(const CFWL_WidgetProperties* pProperties) {
27 if (m_pIface) 23 if (m_pIface)
28 return FWL_Error::Indefinite; 24 return FWL_Error::Indefinite;
29 if (pProperties) { 25 if (pProperties) {
30 *m_pProperties = *pProperties; 26 *m_pProperties = *pProperties;
31 } 27 }
32 std::unique_ptr<IFWL_ComboBox> pComboBox(IFWL_ComboBox::Create( 28 std::unique_ptr<IFWL_ComboBox> pComboBox(IFWL_ComboBox::Create(
33 m_pProperties->MakeWidgetImpProperties(&m_comboBoxData))); 29 m_pProperties->MakeWidgetImpProperties(&m_comboBoxData)));
34 FWL_Error ret = pComboBox->Initialize(); 30 FWL_Error ret = pComboBox->Initialize();
35 if (ret != FWL_Error::Succeeded) { 31 if (ret != FWL_Error::Succeeded) {
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 return FWL_Error::Succeeded; 378 return FWL_Error::Succeeded;
383 } 379 }
384 380
385 FX_FLOAT CFWL_ComboBox::CFWL_ComboBoxDP::GetListHeight(IFWL_Widget* pWidget) { 381 FX_FLOAT CFWL_ComboBox::CFWL_ComboBoxDP::GetListHeight(IFWL_Widget* pWidget) {
386 return m_fMaxListHeight; 382 return m_fMaxListHeight;
387 } 383 }
388 384
389 CFWL_ComboBoxItem::CFWL_ComboBoxItem() : m_pDIB(nullptr), m_pData(nullptr) {} 385 CFWL_ComboBoxItem::CFWL_ComboBoxItem() : m_pDIB(nullptr), m_pData(nullptr) {}
390 386
391 CFWL_ComboBoxItem::~CFWL_ComboBoxItem() {} 387 CFWL_ComboBoxItem::~CFWL_ComboBoxItem() {}
OLDNEW
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_combobox.h ('k') | xfa/fwl/lightwidget/cfwl_datetimepicker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698