| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 2000 Harri Porten (porten@kde.org) | 2 Copyright (C) 2000 Harri Porten (porten@kde.org) |
| 3 Copyright (C) 2000 Daniel Molkentin (molkentin@kde.org) | 3 Copyright (C) 2000 Daniel Molkentin (molkentin@kde.org) |
| 4 Copyright (C) 2000 Stefan Schimanski (schimmi@kde.org) | 4 Copyright (C) 2000 Stefan Schimanski (schimmi@kde.org) |
| 5 Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All Rights Reserved. | 5 Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All Rights Reserved. |
| 6 Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
| 9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
| 10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 PluginData::PluginData(SecurityOrigin* mainFrameOrigin) | 33 PluginData::PluginData(SecurityOrigin* mainFrameOrigin) |
| 34 : m_mainFrameOrigin(mainFrameOrigin) { | 34 : m_mainFrameOrigin(mainFrameOrigin) { |
| 35 PluginListBuilder builder(&m_plugins); | 35 PluginListBuilder builder(&m_plugins); |
| 36 Platform::current()->getPluginList( | 36 Platform::current()->getPluginList( |
| 37 false, WebSecurityOrigin(m_mainFrameOrigin), &builder); | 37 false, WebSecurityOrigin(m_mainFrameOrigin), &builder); |
| 38 | 38 |
| 39 for (unsigned i = 0; i < m_plugins.size(); ++i) { | 39 for (unsigned i = 0; i < m_plugins.size(); ++i) { |
| 40 const PluginInfo& plugin = m_plugins[i]; | 40 const PluginInfo& plugin = m_plugins[i]; |
| 41 for (unsigned j = 0; j < plugin.mimes.size(); ++j) { | 41 for (unsigned j = 0; j < plugin.mimes.size(); ++j) { |
| 42 m_mimes.append(plugin.mimes[j]); | 42 m_mimes.push_back(plugin.mimes[j]); |
| 43 m_mimePluginIndices.append(i); | 43 m_mimePluginIndices.push_back(i); |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 bool PluginData::supportsMimeType(const String& mimeType) const { | 48 bool PluginData::supportsMimeType(const String& mimeType) const { |
| 49 for (unsigned i = 0; i < m_mimes.size(); ++i) | 49 for (unsigned i = 0; i < m_mimes.size(); ++i) |
| 50 if (m_mimes[i].type == mimeType) | 50 if (m_mimes[i].type == mimeType) |
| 51 return true; | 51 return true; |
| 52 return false; | 52 return false; |
| 53 } | 53 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 71 } | 71 } |
| 72 | 72 |
| 73 void PluginData::refreshBrowserSidePluginCache() { | 73 void PluginData::refreshBrowserSidePluginCache() { |
| 74 Vector<PluginInfo> plugins; | 74 Vector<PluginInfo> plugins; |
| 75 PluginListBuilder builder(&plugins); | 75 PluginListBuilder builder(&plugins); |
| 76 Platform::current()->getPluginList(true, WebSecurityOrigin::createUnique(), | 76 Platform::current()->getPluginList(true, WebSecurityOrigin::createUnique(), |
| 77 &builder); | 77 &builder); |
| 78 } | 78 } |
| 79 | 79 |
| 80 } // namespace blink | 80 } // namespace blink |
| OLD | NEW |