1 // Copyright 2014 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef FXJS_CJS_ICON_H_ 8 #define FXJS_CJS_ICON_H_ 9 10 #include "fxjs/JS_Define.h" 11 12 class Icon : public CJS_EmbedObj { 13 public: 14 explicit Icon(CJS_Object* pJSObject); 15 ~Icon() override; 16 17 CJS_Return get_name(CJS_Runtime* pRuntime); 18 CJS_Return set_name(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp); 19 GetIconName()20 WideString GetIconName() const { return m_swIconName; } SetIconName(WideString name)21 void SetIconName(WideString name) { m_swIconName = name; } 22 23 private: 24 WideString m_swIconName; 25 }; 26 27 class CJS_Icon : public CJS_Object { 28 public: 29 static int GetObjDefnID(); 30 static void DefineJSObjects(CFXJS_Engine* pEngine); 31 CJS_Icon(v8::Local<v8::Object> pObject)32 explicit CJS_Icon(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Icon()33 ~CJS_Icon() override {} 34 35 JS_STATIC_PROP(name, name, Icon); 36 37 private: 38 static int ObjDefnID; 39 static const JSPropertySpec PropertySpecs[]; 40 }; 41 42 #endif // FXJS_CJS_ICON_H_ 43