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

Side by Side Diff: xfa/fwl/basewidget/fwl_caretimp.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
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/basewidget/fwl_caretimp.h" 7 #include "xfa/fwl/basewidget/fwl_caretimp.h"
8 8
9 #include "xfa/fwl/basewidget/ifwl_caret.h" 9 #include "xfa/fwl/basewidget/ifwl_caret.h"
10 #include "xfa/fwl/core/cfwl_themebackground.h" 10 #include "xfa/fwl/core/cfwl_themebackground.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } 46 }
47 47
48 CFWL_CaretImp::~CFWL_CaretImp() { 48 CFWL_CaretImp::~CFWL_CaretImp() {
49 delete m_pTimer; 49 delete m_pTimer;
50 } 50 }
51 51
52 FWL_ERR CFWL_CaretImp::GetClassName(CFX_WideString& wsClass) const { 52 FWL_ERR CFWL_CaretImp::GetClassName(CFX_WideString& wsClass) const {
53 wsClass = FWL_CLASS_Caret; 53 wsClass = FWL_CLASS_Caret;
54 return FWL_ERR_Succeeded; 54 return FWL_ERR_Succeeded;
55 } 55 }
56 uint32_t CFWL_CaretImp::GetClassID() const { 56
57 return FWL_CLASSHASH_Caret;
58 }
59 FWL_ERR CFWL_CaretImp::Initialize() { 57 FWL_ERR CFWL_CaretImp::Initialize() {
60 if (CFWL_WidgetImp::Initialize() != FWL_ERR_Succeeded) 58 if (CFWL_WidgetImp::Initialize() != FWL_ERR_Succeeded)
61 return FWL_ERR_Indefinite; 59 return FWL_ERR_Indefinite;
62 m_pDelegate = new CFWL_CaretImpDelegate(this); 60 m_pDelegate = new CFWL_CaretImpDelegate(this);
63 return FWL_ERR_Succeeded; 61 return FWL_ERR_Succeeded;
64 } 62 }
65 FWL_ERR CFWL_CaretImp::Finalize() { 63 FWL_ERR CFWL_CaretImp::Finalize() {
66 if (m_hTimer) { 64 if (m_hTimer) {
67 FWL_StopTimer(m_hTimer); 65 FWL_StopTimer(m_hTimer);
68 m_hTimer = NULL; 66 m_hTimer = NULL;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 145 }
148 CFWL_CaretImpDelegate::CFWL_CaretImpDelegate(CFWL_CaretImp* pOwner) 146 CFWL_CaretImpDelegate::CFWL_CaretImpDelegate(CFWL_CaretImp* pOwner)
149 : m_pOwner(pOwner) {} 147 : m_pOwner(pOwner) {}
150 int32_t CFWL_CaretImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { 148 int32_t CFWL_CaretImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
151 return 1; 149 return 1;
152 } 150 }
153 FWL_ERR CFWL_CaretImpDelegate::OnDrawWidget(CFX_Graphics* pGraphics, 151 FWL_ERR CFWL_CaretImpDelegate::OnDrawWidget(CFX_Graphics* pGraphics,
154 const CFX_Matrix* pMatrix) { 152 const CFX_Matrix* pMatrix) {
155 return m_pOwner->DrawWidget(pGraphics, pMatrix); 153 return m_pOwner->DrawWidget(pGraphics, pMatrix);
156 } 154 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698