| 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 Lesser General Public | 6 * modify it under the terms of the GNU Lesser 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, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "modules/plugins/DOMPluginArray.h" | 21 #include "modules/plugins/DOMPluginArray.h" |
| 22 | 22 |
| 23 #include "core/frame/LocalFrame.h" | 23 #include "core/frame/LocalFrame.h" |
| 24 #include "core/page/Page.h" | 24 #include "core/page/Page.h" |
| 25 #include "platform/plugins/PluginData.h" | 25 #include "platform/plugins/PluginData.h" |
| 26 #include "wtf/Vector.h" | 26 #include "wtf/Vector.h" |
| 27 #include "wtf/text/AtomicString.h" | 27 #include "wtf/text/AtomicString.h" |
| 28 | 28 |
| 29 namespace blink { | 29 namespace blink { |
| 30 | 30 |
| 31 DOMPluginArray::DOMPluginArray(LocalFrame* frame) : DOMWindowProperty(frame) {} | 31 DOMPluginArray::DOMPluginArray(LocalFrame* frame) : ContextClient(frame) {} |
| 32 | 32 |
| 33 DEFINE_TRACE(DOMPluginArray) { | 33 DEFINE_TRACE(DOMPluginArray) { |
| 34 DOMWindowProperty::trace(visitor); | 34 ContextClient::trace(visitor); |
| 35 } | 35 } |
| 36 | 36 |
| 37 unsigned DOMPluginArray::length() const { | 37 unsigned DOMPluginArray::length() const { |
| 38 PluginData* data = pluginData(); | 38 PluginData* data = pluginData(); |
| 39 if (!data) | 39 if (!data) |
| 40 return 0; | 40 return 0; |
| 41 return data->plugins().size(); | 41 return data->plugins().size(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 DOMPlugin* DOMPluginArray::item(unsigned index) { | 44 DOMPlugin* DOMPluginArray::item(unsigned index) { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 71 frame()->reload(FrameLoadTypeReload, ClientRedirectPolicy::ClientRedirect); | 71 frame()->reload(FrameLoadTypeReload, ClientRedirectPolicy::ClientRedirect); |
| 72 } | 72 } |
| 73 | 73 |
| 74 PluginData* DOMPluginArray::pluginData() const { | 74 PluginData* DOMPluginArray::pluginData() const { |
| 75 if (!frame()) | 75 if (!frame()) |
| 76 return nullptr; | 76 return nullptr; |
| 77 return frame()->pluginData(); | 77 return frame()->pluginData(); |
| 78 } | 78 } |
| 79 | 79 |
| 80 } // namespace blink | 80 } // namespace blink |
| OLD | NEW |