| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 String DOMPlugin::description() const | 53 String DOMPlugin::description() const |
| 54 { | 54 { |
| 55 return pluginInfo().desc; | 55 return pluginInfo().desc; |
| 56 } | 56 } |
| 57 | 57 |
| 58 unsigned DOMPlugin::length() const | 58 unsigned DOMPlugin::length() const |
| 59 { | 59 { |
| 60 return pluginInfo().mimes.size(); | 60 return pluginInfo().mimes.size(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 PassRefPtrWillBeRawPtr<DOMMimeType> DOMPlugin::item(unsigned index) | 63 DOMMimeType* DOMPlugin::item(unsigned index) |
| 64 { | 64 { |
| 65 if (index >= pluginInfo().mimes.size()) | 65 if (index >= pluginInfo().mimes.size()) |
| 66 return nullptr; | 66 return nullptr; |
| 67 | 67 |
| 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 PassRefPtrWillBeRawPtr<DOMMimeType> DOMPlugin::namedItem(const AtomicString& pro
pertyName) | 78 DOMMimeType* DOMPlugin::namedItem(const AtomicString& propertyName) |
| 79 { | 79 { |
| 80 const Vector<MimeClassInfo>& mimes = m_pluginData->mimes(); | 80 const Vector<MimeClassInfo>& mimes = m_pluginData->mimes(); |
| 81 for (unsigned i = 0; i < mimes.size(); ++i) { | 81 for (unsigned i = 0; i < mimes.size(); ++i) { |
| 82 if (mimes[i].type == propertyName) | 82 if (mimes[i].type == propertyName) |
| 83 return DOMMimeType::create(m_pluginData.get(), frame(), i); | 83 return DOMMimeType::create(m_pluginData.get(), frame(), i); |
| 84 } | 84 } |
| 85 return nullptr; | 85 return nullptr; |
| 86 } | 86 } |
| 87 | 87 |
| 88 } // namespace blink | 88 } // namespace blink |
| OLD | NEW |