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

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

Issue 1509203002: FWL refcounts never incremented (part 1) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: protected Created 5 years 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/include/fwl/core/fwl_note.h ('k') | xfa/include/fwl/lightwidget/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 #ifndef FWL_TARGET_H_ 7 #ifndef FWL_TARGET_H_
8 #define FWL_TARGET_H_ 8 #define FWL_TARGET_H_
9 9
10 #include "core/include/fxcrt/fx_basic.h" 10 #include "core/include/fxcrt/fx_basic.h"
11 11
12 // FWL contains three parallel inheritance hierarchies, which reference each 12 // FWL contains three parallel inheritance hierarchies, which reference each
13 // other via pointers as follows: 13 // other via pointers as follows:
14 // 14 //
15 // m_pImpl 15 // m_pImpl
16 // (nonesuch) IFWL_Target ----------> CFWL_TargetImp 16 // (nonesuch) IFWL_Target ----------> CFWL_TargetImp
17 // | | 17 // | |
18 // A A 18 // A A
19 // m_pIface | | 19 // m_pIface | |
20 // CFWL_Widget ----------> IFWL_Widget CFWL_WidgetImp 20 // CFWL_Widget ----------> IFWL_Widget CFWL_WidgetImp
21 // | | | 21 // | | |
22 // A A A 22 // A A A
23 // | | | 23 // | | |
24 // CFWL_... IFWL_... CFWL_...Imp 24 // CFWL_... IFWL_... CFWL_...Imp
25 // 25 //
26 26
27 class CFWL_TargetImp; 27 class CFWL_TargetImp;
28 28
29 class IFWL_Target { 29 class IFWL_Target {
30 public: 30 public:
31 IFWL_Target() : m_pImpl(nullptr) {} 31 IFWL_Target() : m_pImpl(nullptr) {}
32 virtual ~IFWL_Target();
32 33
33 FX_DWORD Release();
34 IFWL_Target* Retain();
35 FX_DWORD GetRefCount() const;
36 FWL_ERR GetClassName(CFX_WideString& wsClass) const; 34 FWL_ERR GetClassName(CFX_WideString& wsClass) const;
37 FX_DWORD GetClassID() const; 35 FX_DWORD GetClassID() const;
38 FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const; 36 FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const;
39 FWL_ERR Initialize(); 37 FWL_ERR Initialize();
40 FWL_ERR Finalize(); 38 FWL_ERR Finalize();
41 39
42 CFWL_TargetImp* GetImpl() const { return m_pImpl; } 40 CFWL_TargetImp* GetImpl() const { return m_pImpl; }
43 void SetImpl(CFWL_TargetImp* pImpl) { m_pImpl = pImpl; } 41 void SetImpl(CFWL_TargetImp* pImpl) { m_pImpl = pImpl; }
44 42
45 protected:
46 virtual ~IFWL_Target();
47
48 private: 43 private:
49 CFWL_TargetImp* m_pImpl; 44 CFWL_TargetImp* m_pImpl;
50 }; 45 };
51 46
52 #endif // FWL_TARGET_H_ 47 #endif // FWL_TARGET_H_
OLDNEW
« no previous file with comments | « xfa/include/fwl/core/fwl_note.h ('k') | xfa/include/fwl/lightwidget/widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698