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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 PassRefPtrWillBeRawPtr<DOMMimeType> DOMPlugin::item(unsigned index) | 63 PassRefPtrWillBeRawPtr<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(), m_frame, i).get(); | 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) | 78 bool DOMPlugin::canGetItemsForName(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 true; | 83 return true; |
84 return false; | 84 return false; |
85 } | 85 } |
86 | 86 |
87 PassRefPtrWillBeRawPtr<DOMMimeType> DOMPlugin::namedItem(const AtomicString& pro
pertyName) | 87 PassRefPtrWillBeRawPtr<DOMMimeType> DOMPlugin::namedItem(const AtomicString& pro
pertyName) |
88 { | 88 { |
89 const Vector<MimeClassInfo>& mimes = m_pluginData->mimes(); | 89 const Vector<MimeClassInfo>& mimes = m_pluginData->mimes(); |
90 for (unsigned i = 0; i < mimes.size(); ++i) | 90 for (unsigned i = 0; i < mimes.size(); ++i) { |
91 if (mimes[i].type == propertyName) | 91 if (mimes[i].type == propertyName) |
92 return DOMMimeType::create(m_pluginData.get(), m_frame, i).get(); | 92 return DOMMimeType::create(m_pluginData.get(), frame(), i); |
| 93 } |
93 return nullptr; | 94 return nullptr; |
94 } | 95 } |
95 | 96 |
96 } // namespace blink | 97 } // namespace blink |
OLD | NEW |