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

Side by Side Diff: xfa/fwl/lightwidget/cfwl_theme.cpp

Issue 1946213003: Remove CLASSHASH defines in favour of an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_theme.h ('k') | xfa/fwl/lightwidget/cfwl_widget.h » ('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/lightwidget/cfwl_theme.h" 7 #include "xfa/fwl/lightwidget/cfwl_theme.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 27 matching lines...) Expand all
38 m_ThemesArray.push_back(std::unique_ptr<CFWL_WidgetTP>(new CFWL_BarcodeTP)); 38 m_ThemesArray.push_back(std::unique_ptr<CFWL_WidgetTP>(new CFWL_BarcodeTP));
39 m_ThemesArray.push_back( 39 m_ThemesArray.push_back(
40 std::unique_ptr<CFWL_WidgetTP>(new CFWL_DateTimePickerTP)); 40 std::unique_ptr<CFWL_WidgetTP>(new CFWL_DateTimePickerTP));
41 m_ThemesArray.push_back( 41 m_ThemesArray.push_back(
42 std::unique_ptr<CFWL_WidgetTP>(new CFWL_MonthCalendarTP)); 42 std::unique_ptr<CFWL_WidgetTP>(new CFWL_MonthCalendarTP));
43 m_ThemesArray.push_back(std::unique_ptr<CFWL_WidgetTP>(new CFWL_CaretTP)); 43 m_ThemesArray.push_back(std::unique_ptr<CFWL_WidgetTP>(new CFWL_CaretTP));
44 } 44 }
45 45
46 CFWL_Theme::~CFWL_Theme() {} 46 CFWL_Theme::~CFWL_Theme() {}
47 47
48 FX_BOOL CFWL_Theme::IsValidWidget(IFWL_Widget* pWidget) { 48 bool CFWL_Theme::IsValidWidget(IFWL_Widget* pWidget) {
49 return !!GetTheme(pWidget); 49 return !!GetTheme(pWidget);
50 } 50 }
51 51
52 uint32_t CFWL_Theme::GetThemeID(IFWL_Widget* pWidget) { 52 uint32_t CFWL_Theme::GetThemeID(IFWL_Widget* pWidget) {
53 return GetTheme(pWidget)->GetThemeID(pWidget); 53 return GetTheme(pWidget)->GetThemeID(pWidget);
54 } 54 }
55 55
56 uint32_t CFWL_Theme::SetThemeID(IFWL_Widget* pWidget, 56 uint32_t CFWL_Theme::SetThemeID(IFWL_Widget* pWidget,
57 uint32_t dwThemeID, 57 uint32_t dwThemeID,
58 FX_BOOL bChildren) { 58 FX_BOOL bChildren) {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 return FWL_Error::Succeeded; 131 return FWL_Error::Succeeded;
132 } 132 }
133 133
134 CFWL_WidgetTP* CFWL_Theme::GetTheme(IFWL_Widget* pWidget) { 134 CFWL_WidgetTP* CFWL_Theme::GetTheme(IFWL_Widget* pWidget) {
135 for (const auto& pTheme : m_ThemesArray) { 135 for (const auto& pTheme : m_ThemesArray) {
136 if (pTheme->IsValidWidget(pWidget)) 136 if (pTheme->IsValidWidget(pWidget))
137 return pTheme.get(); 137 return pTheme.get();
138 } 138 }
139 return nullptr; 139 return nullptr;
140 } 140 }
OLDNEW
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_theme.h ('k') | xfa/fwl/lightwidget/cfwl_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698