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

Unified Diff: xfa/fwl/lightwidget/cfwl_picturebox.cpp

Issue 2433133002: Remove IFWL_*::Create methods, use new (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: xfa/fwl/lightwidget/cfwl_picturebox.cpp
diff --git a/xfa/fwl/lightwidget/cfwl_picturebox.cpp b/xfa/fwl/lightwidget/cfwl_picturebox.cpp
index e6328e72ff088ada08795be09c506806e4ba64df..5249f2633b6f1369f9071511c6781150733284b5 100644
--- a/xfa/fwl/lightwidget/cfwl_picturebox.cpp
+++ b/xfa/fwl/lightwidget/cfwl_picturebox.cpp
@@ -8,6 +8,8 @@
#include <memory>
+#include "third_party/base/ptr_util.h"
+
IFWL_PictureBox* CFWL_PictureBox::GetWidget() {
return static_cast<IFWL_PictureBox*>(m_pIface.get());
}
@@ -23,8 +25,9 @@ FWL_Error CFWL_PictureBox::Initialize(
if (pProperties) {
*m_pProperties = *pProperties;
}
- std::unique_ptr<IFWL_PictureBox> pPictureBox(IFWL_PictureBox::Create(
- m_pProperties->MakeWidgetImpProperties(&m_PictureBoxDP), nullptr));
+ std::unique_ptr<IFWL_PictureBox> pPictureBox =
+ pdfium::MakeUnique<IFWL_PictureBox>(
+ m_pProperties->MakeWidgetImpProperties(&m_PictureBoxDP));
FWL_Error ret = pPictureBox->Initialize();
if (ret != FWL_Error::Succeeded) {
return ret;

Powered by Google App Engine
This is Rietveld 408576698