OLD | NEW |
---|---|
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 #ifndef FPDFSDK_JAVASCRIPT_ANNOT_H_ | 7 #ifndef FPDFSDK_JAVASCRIPT_ANNOT_H_ |
8 #define FPDFSDK_JAVASCRIPT_ANNOT_H_ | 8 #define FPDFSDK_JAVASCRIPT_ANNOT_H_ |
9 | 9 |
10 #include <memory> | |
11 | |
10 #include "fpdfsdk/include/cpdfsdk_baannot.h" | 12 #include "fpdfsdk/include/cpdfsdk_baannot.h" |
11 #include "fpdfsdk/javascript/JS_Define.h" | 13 #include "fpdfsdk/javascript/JS_Define.h" |
12 | 14 |
13 class Annot : public CJS_EmbedObj { | 15 class Annot : public CJS_EmbedObj { |
14 public: | 16 public: |
15 explicit Annot(CJS_Object* pJSObject); | 17 explicit Annot(CJS_Object* pJSObject); |
16 ~Annot() override; | 18 ~Annot() override; |
17 | 19 |
18 FX_BOOL hidden(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 20 FX_BOOL hidden(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
19 FX_BOOL name(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 21 FX_BOOL name(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
20 FX_BOOL type(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 22 FX_BOOL type(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
21 | 23 |
22 void SetSDKAnnot(CPDFSDK_BAAnnot* annot); | 24 void SetSDKAnnot(CPDFSDK_BAAnnot* annot); |
23 | 25 |
24 private: | 26 private: |
25 CPDFSDK_BAAnnot* m_BAAnnot = nullptr; | 27 CPDFSDK_Annot* m_Annot = nullptr; |
Lei Zhang
2016/09/02 01:21:25
Can this stay as a CPDFSDK_BAAnnot*, and thus remo
Lei Zhang
2016/09/02 01:21:25
nit: m_pAnnot
dsinclair
2016/09/06 15:44:49
Sigh, can we start moving away from this notation
dsinclair
2016/09/06 15:44:49
No, this has to be a CPDFSDK_Annot so we can pass
| |
28 std::unique_ptr<CPDFSDK_Annot::Observer> m_pObserver; | |
26 }; | 29 }; |
27 | 30 |
28 class CJS_Annot : public CJS_Object { | 31 class CJS_Annot : public CJS_Object { |
29 public: | 32 public: |
30 explicit CJS_Annot(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} | 33 explicit CJS_Annot(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} |
31 ~CJS_Annot() override {} | 34 ~CJS_Annot() override {} |
32 | 35 |
33 DECLARE_JS_CLASS(); | 36 DECLARE_JS_CLASS(); |
34 JS_STATIC_PROP(hidden, Annot); | 37 JS_STATIC_PROP(hidden, Annot); |
35 JS_STATIC_PROP(name, Annot); | 38 JS_STATIC_PROP(name, Annot); |
36 JS_STATIC_PROP(type, Annot); | 39 JS_STATIC_PROP(type, Annot); |
37 }; | 40 }; |
38 | 41 |
39 #endif // FPDFSDK_JAVASCRIPT_ANNOT_H_ | 42 #endif // FPDFSDK_JAVASCRIPT_ANNOT_H_ |
OLD | NEW |