DOMPluginArray.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
  3. Copyright (C) 2008 Apple Inc. All rights reserved.
  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 DOMPluginArray_h
  18. #define DOMPluginArray_h
  19. #include "DOMPlugin.h"
  20. #include "DOMWindowProperty.h"
  21. #include "ScriptWrappable.h"
  22. #include <wtf/Forward.h>
  23. #include <wtf/PassRefPtr.h>
  24. #include <wtf/RefCounted.h>
  25. #include <wtf/Vector.h>
  26. namespace WebCore {
  27. class Frame;
  28. class PluginData;
  29. class DOMPluginArray : public ScriptWrappable, public RefCounted<DOMPluginArray>, public DOMWindowProperty {
  30. public:
  31. static PassRefPtr<DOMPluginArray> create(Frame* frame) { return adoptRef(new DOMPluginArray(frame)); }
  32. ~DOMPluginArray();
  33. unsigned length() const;
  34. PassRefPtr<DOMPlugin> item(unsigned index);
  35. bool canGetItemsForName(const AtomicString& propertyName);
  36. PassRefPtr<DOMPlugin> namedItem(const AtomicString& propertyName);
  37. void refresh(bool reload);
  38. private:
  39. explicit DOMPluginArray(Frame*);
  40. PluginData* pluginData() const;
  41. };
  42. } // namespace WebCore
  43. #endif // PluginArray_h