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

Side by Side Diff: xfa/fwl/lightwidget/cfwl_barcode.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_barcode.h ('k') | xfa/fwl/lightwidget/cfwl_checkbox.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_barcode.h" 7 #include "xfa/fwl/lightwidget/cfwl_barcode.h"
8 8
9 #include <memory> 9 #include <memory>
10 10
11 IFWL_Barcode* CFWL_Barcode::GetWidget() { 11 IFWL_Barcode* CFWL_Barcode::GetWidget() {
12 return static_cast<IFWL_Barcode*>(m_pIface.get()); 12 return static_cast<IFWL_Barcode*>(m_pIface.get());
13 } 13 }
14 14
15 const IFWL_Barcode* CFWL_Barcode::GetWidget() const { 15 const IFWL_Barcode* CFWL_Barcode::GetWidget() const {
16 return static_cast<IFWL_Barcode*>(m_pIface.get()); 16 return static_cast<IFWL_Barcode*>(m_pIface.get());
17 } 17 }
18 18
19 CFWL_Barcode* CFWL_Barcode::Create() {
20 return new CFWL_Barcode;
21 }
22
23 FWL_Error CFWL_Barcode::Initialize(const CFWL_WidgetProperties* pProperties) { 19 FWL_Error CFWL_Barcode::Initialize(const CFWL_WidgetProperties* pProperties) {
24 if (m_pIface) 20 if (m_pIface)
25 return FWL_Error::Indefinite; 21 return FWL_Error::Indefinite;
26 if (pProperties) { 22 if (pProperties) {
27 *m_pProperties = *pProperties; 23 *m_pProperties = *pProperties;
28 } 24 }
29 std::unique_ptr<IFWL_Barcode> pBarcode(IFWL_Barcode::Create( 25 std::unique_ptr<IFWL_Barcode> pBarcode(IFWL_Barcode::Create(
30 m_pProperties->MakeWidgetImpProperties(&m_barcodeData))); 26 m_pProperties->MakeWidgetImpProperties(&m_barcodeData)));
31 FWL_Error ret = pBarcode->Initialize(); 27 FWL_Error ret = pBarcode->Initialize();
32 if (ret != FWL_Error::Succeeded) { 28 if (ret != FWL_Error::Succeeded) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 return m_nECLevel; 102 return m_nECLevel;
107 } 103 }
108 104
109 FX_BOOL CFWL_Barcode::CFWL_BarcodeDP::GetTruncated() { 105 FX_BOOL CFWL_Barcode::CFWL_BarcodeDP::GetTruncated() {
110 return m_bTruncated; 106 return m_bTruncated;
111 } 107 }
112 108
113 uint32_t CFWL_Barcode::CFWL_BarcodeDP::GetBarcodeAttributeMask() { 109 uint32_t CFWL_Barcode::CFWL_BarcodeDP::GetBarcodeAttributeMask() {
114 return m_dwAttributeMask; 110 return m_dwAttributeMask;
115 } 111 }
OLDNEW
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_barcode.h ('k') | xfa/fwl/lightwidget/cfwl_checkbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698