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

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

Issue 2209153002: Use virtual function to retrieve interface pointer (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comment Created 4 years, 4 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
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_pushbutton.h ('k') | xfa/fwl/lightwidget/cfwl_widget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/lightwidget/cfwl_pushbutton.cpp
diff --git a/xfa/fwl/lightwidget/cfwl_pushbutton.cpp b/xfa/fwl/lightwidget/cfwl_pushbutton.cpp
index 7c8a9fa64dbcdc3b8c1c5aa4bfbf90ec13528474..b1031692ddd058b3c6ec01e38e6696a314b63ccb 100644
--- a/xfa/fwl/lightwidget/cfwl_pushbutton.cpp
+++ b/xfa/fwl/lightwidget/cfwl_pushbutton.cpp
@@ -8,6 +8,14 @@
#include <memory>
+IFWL_PushButton* CFWL_PushButton::GetWidget() {
+ return static_cast<IFWL_PushButton*>(m_pIface.get());
+}
+
+const IFWL_PushButton* CFWL_PushButton::GetWidget() const {
+ return static_cast<IFWL_PushButton*>(m_pIface.get());
+}
+
CFWL_PushButton* CFWL_PushButton::Create() {
return new CFWL_PushButton;
}
@@ -25,7 +33,7 @@ FWL_Error CFWL_PushButton::Initialize(
if (ret != FWL_Error::Succeeded) {
return ret;
}
- m_pIface = pPushButton.release();
+ m_pIface = std::move(pPushButton);
CFWL_Widget::Initialize();
return FWL_Error::Succeeded;
}
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_pushbutton.h ('k') | xfa/fwl/lightwidget/cfwl_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698