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

Side by Side Diff: xfa/fwl/ifwl_themeprovider.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_FWL_IFWL_THEMEPROVIDER_H_ 7 #ifndef XFA_FWL_IFWL_THEMEPROVIDER_H_
8 #define XFA_FWL_IFWL_THEMEPROVIDER_H_ 8 #define XFA_FWL_IFWL_THEMEPROVIDER_H_
9 9
10 #include "core/fxcrt/fx_coordinates.h" 10 #include "core/fxcrt/fx_coordinates.h"
11 #include "xfa/fwl/theme/cfwl_widgettp.h" 11 #include "xfa/fwl/theme/cfwl_widgettp.h"
12 12
13 class CFWL_ThemeBackground; 13 class CFWL_ThemeBackground;
14 class CFWL_ThemePart; 14 class CFWL_ThemePart;
15 class CFWL_ThemeText; 15 class CFWL_ThemeText;
16 class CFWL_Widget; 16 class CFWL_Widget;
17 17
18 class IFWL_ThemeProvider { 18 class IFWL_ThemeProvider {
19 public: 19 public:
20 virtual ~IFWL_ThemeProvider() {} 20 virtual ~IFWL_ThemeProvider() {}
21 21
22 virtual void DrawBackground(CFWL_ThemeBackground* pParams) = 0; 22 virtual void DrawBackground(CFWL_ThemeBackground* pParams) = 0;
23 virtual void DrawText(CFWL_ThemeText* pParams) = 0; 23 virtual void DrawText(CFWL_ThemeText* pParams) = 0;
24 virtual void CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) = 0; 24 virtual void CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) = 0;
25 virtual float GetCXBorderSize() const = 0; 25 virtual float GetCXBorderSize() const = 0;
26 virtual float GetCYBorderSize() const = 0; 26 virtual float GetCYBorderSize() const = 0;
27 virtual CFX_RectF GetUIMargin(CFWL_ThemePart* pThemePart) const = 0; 27 virtual CFX_RectF GetUIMargin(CFWL_ThemePart* pThemePart) const = 0;
28 virtual float GetFontSize(CFWL_ThemePart* pThemePart) const = 0; 28 virtual float GetFontSize(CFWL_ThemePart* pThemePart) const = 0;
29 virtual CFGAS_GEFont* GetFont(CFWL_ThemePart* pThemePart) const = 0; 29 virtual CFX_RetainPtr<CFGAS_GEFont> GetFont(
30 CFWL_ThemePart* pThemePart) const = 0;
30 virtual float GetLineHeight(CFWL_ThemePart* pThemePart) const = 0; 31 virtual float GetLineHeight(CFWL_ThemePart* pThemePart) const = 0;
31 virtual float GetScrollBarWidth() const = 0; 32 virtual float GetScrollBarWidth() const = 0;
32 virtual FX_COLORREF GetTextColor(CFWL_ThemePart* pThemePart) const = 0; 33 virtual FX_COLORREF GetTextColor(CFWL_ThemePart* pThemePart) const = 0;
33 virtual CFX_SizeF GetSpaceAboveBelow(CFWL_ThemePart* pThemePart) const = 0; 34 virtual CFX_SizeF GetSpaceAboveBelow(CFWL_ThemePart* pThemePart) const = 0;
34 }; 35 };
35 36
36 #endif // XFA_FWL_IFWL_THEMEPROVIDER_H_ 37 #endif // XFA_FWL_IFWL_THEMEPROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698