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 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Lesser General Public | 5 * modify it under the terms of the GNU Lesser General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 const MimeClassInfo& mime = pluginInfo().mimes[index]; | 68 const MimeClassInfo& mime = pluginInfo().mimes[index]; |
69 | 69 |
70 const Vector<MimeClassInfo>& mimes = m_pluginData->mimes(); | 70 const Vector<MimeClassInfo>& mimes = m_pluginData->mimes(); |
71 for (unsigned i = 0; i < mimes.size(); ++i) { | 71 for (unsigned i = 0; i < mimes.size(); ++i) { |
72 if (mimes[i] == mime && m_pluginData->mimePluginIndices()[i] == m_index) | 72 if (mimes[i] == mime && m_pluginData->mimePluginIndices()[i] == m_index) |
73 return DOMMimeType::create(m_pluginData.get(), frame(), i); | 73 return DOMMimeType::create(m_pluginData.get(), frame(), i); |
74 } | 74 } |
75 return nullptr; | 75 return nullptr; |
76 } | 76 } |
77 | 77 |
78 bool DOMPlugin::canGetItemsForName(const AtomicString& propertyName) | |
79 { | |
80 const Vector<MimeClassInfo>& mimes = m_pluginData->mimes(); | |
81 for (unsigned i = 0; i < mimes.size(); ++i) | |
82 if (mimes[i].type == propertyName) | |
83 return true; | |
84 return false; | |
85 } | |
86 | |
87 PassRefPtrWillBeRawPtr<DOMMimeType> DOMPlugin::namedItem(const AtomicString& pro
pertyName) | 78 PassRefPtrWillBeRawPtr<DOMMimeType> DOMPlugin::namedItem(const AtomicString& pro
pertyName) |
88 { | 79 { |
89 const Vector<MimeClassInfo>& mimes = m_pluginData->mimes(); | 80 const Vector<MimeClassInfo>& mimes = m_pluginData->mimes(); |
90 for (unsigned i = 0; i < mimes.size(); ++i) { | 81 for (unsigned i = 0; i < mimes.size(); ++i) { |
91 if (mimes[i].type == propertyName) | 82 if (mimes[i].type == propertyName) |
92 return DOMMimeType::create(m_pluginData.get(), frame(), i); | 83 return DOMMimeType::create(m_pluginData.get(), frame(), i); |
93 } | 84 } |
94 return nullptr; | 85 return nullptr; |
95 } | 86 } |
96 | 87 |
97 } // namespace blink | 88 } // namespace blink |
OLD | NEW |