OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 2 Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
3 Copyright (C) 2008 Apple Inc. All rights reserved. | 3 Copyright (C) 2008 Apple Inc. All rights reserved. |
4 | 4 |
5 This library is free software; you can redistribute it and/or | 5 This library is free software; you can redistribute it and/or |
6 modify it under the terms of the GNU Library General Public | 6 modify it under the terms of the GNU Library General Public |
7 License as published by the Free Software Foundation; either | 7 License as published by the Free Software Foundation; either |
8 version 2 of the License, or (at your option) any later version. | 8 version 2 of the License, or (at your option) any later version. |
9 | 9 |
10 This library is distributed in the hope that it will be useful, | 10 This library is distributed in the hope that it will be useful, |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 Library General Public License for more details. | 13 Library General Public License for more details. |
14 | 14 |
15 You should have received a copy of the GNU Library General Public License | 15 You should have received a copy of the GNU Library General Public License |
16 along with this library; see the file COPYING.LIB. If not, write to | 16 along with this library; see the file COPYING.LIB. If not, write to |
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 Boston, MA 02110-1301, USA. | 18 Boston, MA 02110-1301, USA. |
19 */ | 19 */ |
20 | 20 |
21 #ifndef DOMPluginArray_h | 21 #ifndef DOMPluginArray_h |
22 #define DOMPluginArray_h | 22 #define DOMPluginArray_h |
23 | 23 |
24 #include "bindings/core/v8/ScriptWrappable.h" | 24 #include "bindings/core/v8/ScriptWrappable.h" |
25 #include "core/frame/DOMWindowProperty.h" | 25 #include "core/frame/DOMWindowProperty.h" |
26 #include "modules/plugins/DOMPlugin.h" | 26 #include "modules/plugins/DOMPlugin.h" |
27 #include "platform/heap/Handle.h" | 27 #include "platform/heap/Handle.h" |
28 #include "wtf/Forward.h" | 28 #include "wtf/Forward.h" |
29 #include "wtf/PassRefPtr.h" | |
30 #include "wtf/RefCounted.h" | |
31 | 29 |
32 namespace blink { | 30 namespace blink { |
33 | 31 |
34 class LocalFrame; | 32 class LocalFrame; |
35 class PluginData; | 33 class PluginData; |
36 | 34 |
37 class DOMPluginArray final : public RefCountedWillBeGarbageCollected<DOMPluginAr
ray>, public ScriptWrappable, public DOMWindowProperty { | 35 class DOMPluginArray final : public GarbageCollectedFinalized<DOMPluginArray>, p
ublic ScriptWrappable, public DOMWindowProperty { |
38 DEFINE_WRAPPERTYPEINFO(); | 36 DEFINE_WRAPPERTYPEINFO(); |
39 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DOMPluginArray); | 37 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DOMPluginArray); |
40 public: | 38 public: |
41 static PassRefPtrWillBeRawPtr<DOMPluginArray> create(LocalFrame* frame) | 39 static DOMPluginArray* create(LocalFrame* frame) |
42 { | 40 { |
43 return adoptRefWillBeNoop(new DOMPluginArray(frame)); | 41 return new DOMPluginArray(frame); |
44 } | 42 } |
45 | 43 |
46 unsigned length() const; | 44 unsigned length() const; |
47 PassRefPtrWillBeRawPtr<DOMPlugin> item(unsigned index); | 45 DOMPlugin* item(unsigned index); |
48 PassRefPtrWillBeRawPtr<DOMPlugin> namedItem(const AtomicString& propertyName
); | 46 DOMPlugin* namedItem(const AtomicString& propertyName); |
49 | 47 |
50 void refresh(bool reload); | 48 void refresh(bool reload); |
51 | 49 |
52 DECLARE_VIRTUAL_TRACE(); | 50 DECLARE_VIRTUAL_TRACE(); |
53 | 51 |
54 private: | 52 private: |
55 explicit DOMPluginArray(LocalFrame*); | 53 explicit DOMPluginArray(LocalFrame*); |
56 PluginData* pluginData() const; | 54 PluginData* pluginData() const; |
57 }; | 55 }; |
58 | 56 |
59 } // namespace blink | 57 } // namespace blink |
60 | 58 |
61 #endif // PluginArray_h | 59 #endif // DOMPluginArray_h |
OLD | NEW |