/src/3rdparty/webkit/Source/WebCore/generated/JSNotificationCenter.h

https://bitbucket.org/ultra_iter/qt-vtl · C Header · 104 lines · 63 code · 20 blank · 21 comment · 0 complexity · ec516ace550f279f1b3e251d8eccde26 MD5 · raw file

  1. /*
  2. This file is part of the WebKit open source project.
  3. This file has been generated by generate-bindings.pl. DO NOT MODIFY!
  4. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public
  6. License as published by the Free Software Foundation; either
  7. version 2 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Library General Public License for more details.
  12. You should have received a copy of the GNU Library General Public License
  13. along with this library; see the file COPYING.LIB. If not, write to
  14. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  15. Boston, MA 02110-1301, USA.
  16. */
  17. #ifndef JSNotificationCenter_h
  18. #define JSNotificationCenter_h
  19. #if ENABLE(NOTIFICATIONS)
  20. #include "JSDOMBinding.h"
  21. #include <runtime/JSGlobalObject.h>
  22. #include <runtime/JSObjectWithGlobalObject.h>
  23. #include <runtime/ObjectPrototype.h>
  24. namespace WebCore {
  25. class NotificationCenter;
  26. class JSNotificationCenter : public JSDOMWrapper {
  27. typedef JSDOMWrapper Base;
  28. public:
  29. JSNotificationCenter(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<NotificationCenter>);
  30. static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
  31. static const JSC::ClassInfo s_info;
  32. static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
  33. {
  34. return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
  35. }
  36. // Custom functions
  37. JSC::JSValue requestPermission(JSC::ExecState*);
  38. NotificationCenter* impl() const { return m_impl.get(); }
  39. private:
  40. RefPtr<NotificationCenter> m_impl;
  41. protected:
  42. static const unsigned StructureFlags = Base::StructureFlags;
  43. };
  44. class JSNotificationCenterOwner : public JSC::WeakHandleOwner {
  45. virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
  46. virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
  47. };
  48. inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, NotificationCenter*)
  49. {
  50. DEFINE_STATIC_LOCAL(JSNotificationCenterOwner, jsNotificationCenterOwner, ());
  51. return &jsNotificationCenterOwner;
  52. }
  53. inline void* wrapperContext(DOMWrapperWorld* world, NotificationCenter*)
  54. {
  55. return world;
  56. }
  57. JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, NotificationCenter*);
  58. NotificationCenter* toNotificationCenter(JSC::JSValue);
  59. class JSNotificationCenterPrototype : public JSC::JSObjectWithGlobalObject {
  60. typedef JSC::JSObjectWithGlobalObject Base;
  61. public:
  62. static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
  63. static const JSC::ClassInfo s_info;
  64. virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
  65. virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
  66. static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
  67. {
  68. return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
  69. }
  70. JSNotificationCenterPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) : JSC::JSObjectWithGlobalObject(globalData, globalObject, structure) { }
  71. protected:
  72. static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
  73. };
  74. // Functions
  75. JSC::EncodedJSValue JSC_HOST_CALL jsNotificationCenterPrototypeFunctionCreateHTMLNotification(JSC::ExecState*);
  76. JSC::EncodedJSValue JSC_HOST_CALL jsNotificationCenterPrototypeFunctionCreateNotification(JSC::ExecState*);
  77. JSC::EncodedJSValue JSC_HOST_CALL jsNotificationCenterPrototypeFunctionCheckPermission(JSC::ExecState*);
  78. JSC::EncodedJSValue JSC_HOST_CALL jsNotificationCenterPrototypeFunctionRequestPermission(JSC::ExecState*);
  79. } // namespace WebCore
  80. #endif // ENABLE(NOTIFICATIONS)
  81. #endif