diff options
author | Leon Clarke <leonclarke@google.com> | 2010-07-15 12:03:35 +0100 |
---|---|---|
committer | Leon Clarke <leonclarke@google.com> | 2010-07-20 16:57:23 +0100 |
commit | e458d70a0d18538346f41b503114c9ebe6b2ce12 (patch) | |
tree | 86f1637deca2c524432a822e5fcedd4bef221091 /WebCore/plugins/PluginArray.cpp | |
parent | f43eabc081f7ce6af24b9df4953498a3cd6ca24d (diff) | |
download | external_webkit-e458d70a0d18538346f41b503114c9ebe6b2ce12.zip external_webkit-e458d70a0d18538346f41b503114c9ebe6b2ce12.tar.gz external_webkit-e458d70a0d18538346f41b503114c9ebe6b2ce12.tar.bz2 |
Merge WebKit at r63173 : Initial merge by git.
Change-Id: Ife5af0c7c6261fbbc8ae6bc08c390efa9ef10b44
Diffstat (limited to 'WebCore/plugins/PluginArray.cpp')
-rw-r--r-- | WebCore/plugins/PluginArray.cpp | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/WebCore/plugins/PluginArray.cpp b/WebCore/plugins/PluginArray.cpp deleted file mode 100644 index 038e4ad..0000000 --- a/WebCore/plugins/PluginArray.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) - * Copyright (C) 2008 Apple Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "config.h" -#include "PluginArray.h" - -#include "AtomicString.h" -#include "Frame.h" -#include "Page.h" -#include "Plugin.h" -#include "PluginData.h" - -namespace WebCore { - -PluginArray::PluginArray(Frame* frame) - : m_frame(frame) -{ -} - -PluginArray::~PluginArray() -{ -} - -unsigned PluginArray::length() const -{ - PluginData* data = pluginData(); - if (!data) - return 0; - return data->plugins().size(); -} - -PassRefPtr<Plugin> PluginArray::item(unsigned index) -{ - PluginData* data = pluginData(); - if (!data) - return 0; - const Vector<PluginInfo>& plugins = data->plugins(); - if (index >= plugins.size()) - return 0; - return Plugin::create(data, index).get(); -} - -bool PluginArray::canGetItemsForName(const AtomicString& propertyName) -{ - PluginData* data = pluginData(); - if (!data) - return 0; - const Vector<PluginInfo>& plugins = data->plugins(); - for (unsigned i = 0; i < plugins.size(); ++i) { - if (plugins[i].name == propertyName) - return true; - } - return false; -} - -PassRefPtr<Plugin> PluginArray::namedItem(const AtomicString& propertyName) -{ - PluginData* data = pluginData(); - if (!data) - return 0; - const Vector<PluginInfo>& plugins = data->plugins(); - for (unsigned i = 0; i < plugins.size(); ++i) { - if (plugins[i].name == propertyName) - return Plugin::create(data, i).get(); - } - return 0; -} - -void PluginArray::refresh(bool reload) -{ - Page::refreshPlugins(reload); -} - -PluginData* PluginArray::pluginData() const -{ - if (!m_frame) - return 0; - Page* page = m_frame->page(); - if (!page) - return 0; - return page->pluginData(); -} - -} // namespace WebCore |