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

Side by Side Diff: xfa/fwl/core/cfwl_widget.cpp

Issue 2466273003: Change IFWL_Widget to store a single delegate. (Closed)
Patch Set: Fix Mac 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/cfwl_widget.h ('k') | xfa/fwl/core/cfwl_widgetmgr.cpp » ('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/core/cfwl_widget.h" 7 #include "xfa/fwl/core/cfwl_widget.h"
8 8
9 #include "xfa/fde/tto/fde_textout.h" 9 #include "xfa/fde/tto/fde_textout.h"
10 #include "xfa/fwl/core/cfwl_themetext.h" 10 #include "xfa/fwl/core/cfwl_themetext.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 return m_pIface->HitTest(fx, fy); 120 return m_pIface->HitTest(fx, fy);
121 } 121 }
122 122
123 FWL_Error CFWL_Widget::DrawWidget(CFX_Graphics* pGraphics, 123 FWL_Error CFWL_Widget::DrawWidget(CFX_Graphics* pGraphics,
124 const CFX_Matrix* pMatrix) { 124 const CFX_Matrix* pMatrix) {
125 if (!m_pIface) 125 if (!m_pIface)
126 return FWL_Error::Indefinite; 126 return FWL_Error::Indefinite;
127 return m_pIface->DrawWidget(pGraphics, pMatrix); 127 return m_pIface->DrawWidget(pGraphics, pMatrix);
128 } 128 }
129 129
130 IFWL_WidgetDelegate* CFWL_Widget::GetCurrentDelegate() { 130 std::unique_ptr<IFWL_WidgetDelegate> CFWL_Widget::ReleaseDelegate() {
131 return m_pIface ? m_pIface->GetCurrentDelegate() : nullptr; 131 return m_pIface ? m_pIface->ReleaseDelegate() : nullptr;
132 } 132 }
133 133
134 void CFWL_Widget::SetCurrentDelegate(IFWL_WidgetDelegate* pDelegate) { 134 void CFWL_Widget::SetDelegate(std::unique_ptr<IFWL_WidgetDelegate> pDelegate) {
135 if (m_pIface) 135 if (m_pIface)
136 m_pIface->SetCurrentDelegate(pDelegate); 136 m_pIface->SetDelegate(std::move(pDelegate));
137 } 137 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/cfwl_widget.h ('k') | xfa/fwl/core/cfwl_widgetmgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698