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

Side by Side Diff: xfa/include/fwl/core/fwl_note.h

Issue 1453473002: FWL refcounts never incremented (part 2). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 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 | « no previous file | xfa/include/fwl/core/fwl_target.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 #ifndef _FWL_NOTE_H 7 #ifndef _FWL_NOTE_H
8 #define _FWL_NOTE_H 8 #define _FWL_NOTE_H
9 class IFWL_Target; 9 class IFWL_Target;
10 class IFWL_Widget; 10 class IFWL_Widget;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 class CFWL_Note { 123 class CFWL_Note {
124 public: 124 public:
125 virtual FX_DWORD Release() { 125 virtual FX_DWORD Release() {
126 m_dwRefCount--; 126 m_dwRefCount--;
127 FX_DWORD dwRefCount = m_dwRefCount; 127 FX_DWORD dwRefCount = m_dwRefCount;
128 if (!m_dwRefCount) { 128 if (!m_dwRefCount) {
129 delete this; 129 delete this;
130 } 130 }
131 return dwRefCount; 131 return dwRefCount;
132 } 132 }
133 virtual IFWL_Target* Retain() { 133 virtual IFWL_Target* Retain() {
Tom Sepez 2015/11/16 20:07:11 Doesn't override anything, provides its own m_dwRe
Lei Zhang 2015/11/16 20:34:49 This is the root for a different class hierachy. I
134 m_dwRefCount++; 134 m_dwRefCount++;
135 return (IFWL_Target*)this; 135 return (IFWL_Target*)this; // Illegal cast.
136 } 136 }
137 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const { 137 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const {
138 wsClass = L"CFWL_Note"; 138 wsClass = L"CFWL_Note";
139 return FWL_ERR_Succeeded; 139 return FWL_ERR_Succeeded;
140 } 140 }
141 virtual FX_DWORD GetClassID() const { return 0; } 141 virtual FX_DWORD GetClassID() const { return 0; }
142 virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const { 142 virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const {
143 return TRUE; 143 return TRUE;
144 } 144 }
145 virtual CFWL_Note* Clone() { return NULL; } 145 virtual CFWL_Note* Clone() { return NULL; }
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 }; 368 };
369 FWL_ERR FWL_AddToolTipTarget(IFWL_ToolTipTarget* pTarget); 369 FWL_ERR FWL_AddToolTipTarget(IFWL_ToolTipTarget* pTarget);
370 FWL_ERR FWL_RemoveToolTipTarget(IFWL_ToolTipTarget* pTarget); 370 FWL_ERR FWL_RemoveToolTipTarget(IFWL_ToolTipTarget* pTarget);
371 FWL_ERR FWL_SetToolTipInitialDelay(int32_t iDelayTime); 371 FWL_ERR FWL_SetToolTipInitialDelay(int32_t iDelayTime);
372 FWL_ERR FWL_SetToolTipAutoPopDelay(int32_t iDelayTime); 372 FWL_ERR FWL_SetToolTipAutoPopDelay(int32_t iDelayTime);
373 typedef FX_BOOL (*FWLMessageHookCallback)(CFWL_Message* msg, void* info); 373 typedef FX_BOOL (*FWLMessageHookCallback)(CFWL_Message* msg, void* info);
374 FWL_ERR FWL_SetHook(IFWL_NoteDriver* driver, 374 FWL_ERR FWL_SetHook(IFWL_NoteDriver* driver,
375 FWLMessageHookCallback callback, 375 FWLMessageHookCallback callback,
376 void* info); 376 void* info);
377 #endif 377 #endif
OLDNEW
« no previous file with comments | « no previous file | xfa/include/fwl/core/fwl_target.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698