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

Side by Side Diff: fpdfsdk/javascript/Annot.cpp

Issue 2311343003: Make Observers into a templated class (Closed)
Patch Set: Make Annot is-a CPDFSDK_Annot::Observer Created 4 years, 3 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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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 "fpdfsdk/javascript/Annot.h" 7 #include "fpdfsdk/javascript/Annot.h"
8 8
9 #include "fpdfsdk/javascript/JS_Define.h" 9 #include "fpdfsdk/javascript/JS_Define.h"
10 #include "fpdfsdk/javascript/JS_Object.h" 10 #include "fpdfsdk/javascript/JS_Object.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 CPDFSDK_BAAnnot* baAnnot = ToBAAnnot(m_pAnnot); 99 CPDFSDK_BAAnnot* baAnnot = ToBAAnnot(m_pAnnot);
100 if (!baAnnot) 100 if (!baAnnot)
101 return FALSE; 101 return FALSE;
102 102
103 vp << CPDF_Annot::AnnotSubtypeToString(baAnnot->GetAnnotSubtype()); 103 vp << CPDF_Annot::AnnotSubtypeToString(baAnnot->GetAnnotSubtype());
104 return TRUE; 104 return TRUE;
105 } 105 }
106 106
107 void Annot::SetSDKAnnot(CPDFSDK_BAAnnot* annot) { 107 void Annot::SetSDKAnnot(CPDFSDK_BAAnnot* annot) {
108 m_pAnnot = annot; 108 m_pAnnot = annot;
109 m_pObserver.reset(new CPDFSDK_Annot::Observer(&m_pAnnot)); 109 SetWatchedPtr(&m_pAnnot);
110 } 110 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698