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 "config.h" | 24 #include "config.h" |
25 #include "core/plugins/PluginData.h" | 25 #include "platform/plugins/PluginData.h" |
26 | 26 |
27 #include "core/plugins/PluginListBuilder.h" | 27 #include "platform/plugins/PluginListBuilder.h" |
28 #include "public/platform/Platform.h" | 28 #include "public/platform/Platform.h" |
29 | 29 |
30 namespace WebCore { | 30 namespace WebCore { |
31 | 31 |
32 class PluginCache { | 32 class PluginCache { |
33 public: | 33 public: |
34 PluginCache() : m_loaded(false), m_refresh(false) {} | 34 PluginCache() : m_loaded(false), m_refresh(false) { } |
35 ~PluginCache() { reset(false); } | 35 ~PluginCache() { reset(false); } |
36 | 36 |
37 void reset(bool refresh) | 37 void reset(bool refresh) |
38 { | 38 { |
39 m_plugins.clear(); | 39 m_plugins.clear(); |
40 m_loaded = false; | 40 m_loaded = false; |
41 m_refresh = refresh; | 41 m_refresh = refresh; |
42 } | 42 } |
43 | 43 |
44 const Vector<PluginInfo>& plugins() | 44 const Vector<PluginInfo>& plugins() |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 for (size_t k = 0; k < extensions.size(); ++k) { | 134 for (size_t k = 0; k < extensions.size(); ++k) { |
135 if (extension == extensions[k]) | 135 if (extension == extensions[k]) |
136 return mime.type; | 136 return mime.type; |
137 } | 137 } |
138 } | 138 } |
139 } | 139 } |
140 return String(); | 140 return String(); |
141 } | 141 } |
142 | 142 |
143 } | 143 } |
OLD | NEW |