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

Side by Side Diff: xfa/fxfa/fxfa_widget.h

Issue 2609423003: Properly ref-count CFGAS_GEFont with CFX_RetainPtr. (Closed)
Patch Set: comments Created 3 years, 11 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
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 #ifndef XFA_FXFA_FXFA_WIDGET_H_ 7 #ifndef XFA_FXFA_FXFA_WIDGET_H_
8 #define XFA_FXFA_FXFA_WIDGET_H_ 8 #define XFA_FXFA_FXFA_WIDGET_H_
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "core/fxcrt/cfx_retain_ptr.h"
12 #include "core/fxcrt/fx_coordinates.h" 13 #include "core/fxcrt/fx_coordinates.h"
13 #include "core/fxge/fx_dib.h" 14 #include "core/fxge/fx_dib.h"
14 #include "xfa/fxfa/parser/cxfa_box.h" 15 #include "xfa/fxfa/parser/cxfa_box.h"
15 #include "xfa/fxfa/parser/cxfa_event.h" 16 #include "xfa/fxfa/parser/cxfa_event.h"
16 #include "xfa/fxfa/parser/cxfa_image.h" 17 #include "xfa/fxfa/parser/cxfa_image.h"
17 #include "xfa/fxfa/parser/cxfa_margin.h" 18 #include "xfa/fxfa/parser/cxfa_margin.h"
18 #include "xfa/fxfa/parser/cxfa_script.h" 19 #include "xfa/fxfa/parser/cxfa_script.h"
19 #include "xfa/fxfa/parser/cxfa_value.h" 20 #include "xfa/fxfa/parser/cxfa_value.h"
20 #include "xfa/fxfa/parser/cxfa_widgetdata.h" 21 #include "xfa/fxfa/parser/cxfa_widgetdata.h"
21 22
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 void GetImageEditDpi(int32_t& iImageXDpi, int32_t& iImageYDpi); 69 void GetImageEditDpi(int32_t& iImageXDpi, int32_t& iImageYDpi);
69 CXFA_TextLayout* GetCaptionTextLayout(); 70 CXFA_TextLayout* GetCaptionTextLayout();
70 CXFA_TextLayout* GetTextLayout(); 71 CXFA_TextLayout* GetTextLayout();
71 CFX_DIBitmap* GetImageImage(); 72 CFX_DIBitmap* GetImageImage();
72 CFX_DIBitmap* GetImageEditImage(); 73 CFX_DIBitmap* GetImageEditImage();
73 void SetImageImage(CFX_DIBitmap* newImage); 74 void SetImageImage(CFX_DIBitmap* newImage);
74 void SetImageEditImage(CFX_DIBitmap* newImage); 75 void SetImageEditImage(CFX_DIBitmap* newImage);
75 void UpdateUIDisplay(CXFA_FFWidget* pExcept = nullptr); 76 void UpdateUIDisplay(CXFA_FFWidget* pExcept = nullptr);
76 77
77 CXFA_Node* GetDatasets(); 78 CXFA_Node* GetDatasets();
78 CFGAS_GEFont* GetFDEFont(); 79 CFX_RetainPtr<CFGAS_GEFont> GetFDEFont();
79 FX_FLOAT GetFontSize(); 80 FX_FLOAT GetFontSize();
80 FX_ARGB GetTextColor(); 81 FX_ARGB GetTextColor();
81 FX_FLOAT GetLineHeight(); 82 FX_FLOAT GetLineHeight();
82 CXFA_WidgetLayoutData* GetWidgetLayoutData(); 83 CXFA_WidgetLayoutData* GetWidgetLayoutData();
83 84
84 protected: 85 protected:
85 void ProcessScriptTestValidate(CXFA_Validate validate, 86 void ProcessScriptTestValidate(CXFA_Validate validate,
86 int32_t iRet, 87 int32_t iRet,
87 CFXJSE_Value* pRetValue, 88 CFXJSE_Value* pRetValue,
88 bool bVersionFlag); 89 bool bVersionFlag);
(...skipping 22 matching lines...) Expand all
111 FX_FLOAT& fCalcHeight); 112 FX_FLOAT& fCalcHeight);
112 void InitLayoutData(); 113 void InitLayoutData();
113 void StartTextLayout(FX_FLOAT& fCalcWidth, FX_FLOAT& fCalcHeight); 114 void StartTextLayout(FX_FLOAT& fCalcWidth, FX_FLOAT& fCalcHeight);
114 115
115 CXFA_FFDocView* m_pDocView; 116 CXFA_FFDocView* m_pDocView;
116 std::unique_ptr<CXFA_WidgetLayoutData> m_pLayoutData; 117 std::unique_ptr<CXFA_WidgetLayoutData> m_pLayoutData;
117 uint32_t m_nRecursionDepth; 118 uint32_t m_nRecursionDepth;
118 }; 119 };
119 120
120 #endif // XFA_FXFA_FXFA_WIDGET_H_ 121 #endif // XFA_FXFA_FXFA_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698