• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 The PDFium Authors
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/cjs_object.h"
11 #include "fxjs/js_define.h"
12 
13 class CJS_Icon final : public CJS_Object {
14  public:
15   static uint32_t GetObjDefnID();
16   static void DefineJSObjects(CFXJS_Engine* pEngine);
17 
18   CJS_Icon(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime);
19   ~CJS_Icon() override;
20 
GetIconName()21   WideString GetIconName() const { return m_swIconName; }
SetIconName(WideString name)22   void SetIconName(WideString name) { m_swIconName = name; }
23 
24   JS_STATIC_PROP(name, name, CJS_Icon)
25 
26  private:
27   static uint32_t ObjDefnID;
28   static const char kName[];
29   static const JSPropertySpec PropertySpecs[];
30 
31   CJS_Result get_name(CJS_Runtime* pRuntime);
32   CJS_Result set_name(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
33 
34   WideString m_swIconName;
35 };
36 
37 #endif  // FXJS_CJS_ICON_H_
38