| 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 |
| 11 version 2 of the License, or (at your option) any later version. | 11 version 2 of the License, or (at your option) any later version. |
| 12 | 12 |
| 13 This library is distributed in the hope that it will be useful, | 13 This library is distributed in the hope that it will be useful, |
| 14 but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 Library General Public License for more details. | 16 Library General Public License for more details. |
| 17 | 17 |
| 18 You should have received a copy of the GNU Library General Public License | 18 You should have received a copy of the GNU Library General Public License |
| 19 along with this library; see the file COPYING.LIB. If not, write to | 19 along with this library; see the file COPYING.LIB. If not, write to |
| 20 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 20 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 21 Boston, MA 02110-1301, USA. | 21 Boston, MA 02110-1301, USA. |
| 22 */ | 22 */ |
| 23 | 23 |
| 24 #include "platform/plugins/PluginData.h" | 24 #include "platform/plugins/PluginData.h" |
| 25 | 25 |
| 26 #include "platform/plugins/PluginListBuilder.h" | 26 #include "platform/plugins/PluginListBuilder.h" |
| 27 #include "platform/weborigin/SecurityOrigin.h" | 27 #include "platform/weborigin/SecurityOrigin.h" |
| 28 #include "public/platform/Platform.h" | 28 #include "public/platform/Platform.h" |
| 29 #include "public/platform/WebSecurityOrigin.h" | 29 #include "public/platform/WebSecurityOrigin.h" |
| 30 #include "wtf/CurrentTime.h" |
| 30 | 31 |
| 31 namespace blink { | 32 namespace blink { |
| 32 | 33 |
| 33 PluginData::PluginData(SecurityOrigin* mainFrameOrigin) | 34 PluginData::PluginData(SecurityOrigin* mainFrameOrigin) |
| 34 : m_mainFrameOrigin(mainFrameOrigin) | 35 : m_mainFrameOrigin(mainFrameOrigin) |
| 36 , m_modified(WTF::currentTime()) |
| 35 { | 37 { |
| 36 PluginListBuilder builder(&m_plugins); | 38 PluginListBuilder builder(&m_plugins); |
| 37 Platform::current()->getPluginList(false, WebSecurityOrigin(m_mainFrameOrigi
n), &builder); | 39 Platform::current()->getPluginList(false, WebSecurityOrigin(m_mainFrameOrigi
n), &builder); |
| 38 | 40 |
| 39 for (unsigned i = 0; i < m_plugins.size(); ++i) { | 41 for (unsigned i = 0; i < m_plugins.size(); ++i) { |
| 40 const PluginInfo& plugin = m_plugins[i]; | 42 const PluginInfo& plugin = m_plugins[i]; |
| 41 for (unsigned j = 0; j < plugin.mimes.size(); ++j) { | 43 for (unsigned j = 0; j < plugin.mimes.size(); ++j) { |
| 42 m_mimes.append(plugin.mimes[j]); | 44 m_mimes.append(plugin.mimes[j]); |
| 43 m_mimePluginIndices.append(i); | 45 m_mimePluginIndices.append(i); |
| 44 } | 46 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 73 } | 75 } |
| 74 | 76 |
| 75 void PluginData::refreshBrowserSidePluginCache() | 77 void PluginData::refreshBrowserSidePluginCache() |
| 76 { | 78 { |
| 77 Vector<PluginInfo> plugins; | 79 Vector<PluginInfo> plugins; |
| 78 PluginListBuilder builder(&plugins); | 80 PluginListBuilder builder(&plugins); |
| 79 Platform::current()->getPluginList(true, WebSecurityOrigin::createUnique(),
&builder); | 81 Platform::current()->getPluginList(true, WebSecurityOrigin::createUnique(),
&builder); |
| 80 } | 82 } |
| 81 | 83 |
| 82 } // namespace blink | 84 } // namespace blink |
| OLD | NEW |