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 Library General Public | 5 modify it under the terms of the GNU Library 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 class PLATFORM_EXPORT PluginData : public RefCounted<PluginData> { | 51 class PLATFORM_EXPORT PluginData : public RefCounted<PluginData> { |
52 public: | 52 public: |
53 static PassRefPtr<PluginData> create(const Page* page) { return adoptRef(new
PluginData(page)); } | 53 static PassRefPtr<PluginData> create(const Page* page) { return adoptRef(new
PluginData(page)); } |
54 | 54 |
55 const Vector<PluginInfo>& plugins() const { return m_plugins; } | 55 const Vector<PluginInfo>& plugins() const { return m_plugins; } |
56 const Vector<MimeClassInfo>& mimes() const { return m_mimes; } | 56 const Vector<MimeClassInfo>& mimes() const { return m_mimes; } |
57 const Vector<size_t>& mimePluginIndices() const { return m_mimePluginIndices
; } | 57 const Vector<size_t>& mimePluginIndices() const { return m_mimePluginIndices
; } |
58 | 58 |
59 bool supportsMimeType(const String& mimeType) const; | 59 bool supportsMimeType(const String& mimeType) const; |
60 String pluginNameForMimeType(const String& mimeType) const; | 60 String pluginNameForMimeType(const String& mimeType) const; |
61 String pluginFileForMimeType(const String& mimeType) const; | |
62 | 61 |
63 static void refresh(); | 62 static void refresh(); |
64 | 63 |
65 private: | 64 private: |
66 explicit PluginData(const Page*); | 65 explicit PluginData(const Page*); |
67 void initPlugins(const Page*); | 66 void initPlugins(const Page*); |
68 const PluginInfo* pluginInfoForMimeType(const String& mimeType) const; | 67 const PluginInfo* pluginInfoForMimeType(const String& mimeType) const; |
69 | 68 |
70 Vector<PluginInfo> m_plugins; | 69 Vector<PluginInfo> m_plugins; |
71 Vector<MimeClassInfo> m_mimes; | 70 Vector<MimeClassInfo> m_mimes; |
72 Vector<size_t> m_mimePluginIndices; | 71 Vector<size_t> m_mimePluginIndices; |
73 }; | 72 }; |
74 | 73 |
75 // Checks if any of the plugins handle this extension, and if so returns the | 74 // Checks if any of the plugins handle this extension, and if so returns the |
76 // plugin's mime type for this extension. Otherwise returns an empty string. | 75 // plugin's mime type for this extension. Otherwise returns an empty string. |
77 PLATFORM_EXPORT String getPluginMimeTypeFromExtension(const String& extension); | 76 PLATFORM_EXPORT String getPluginMimeTypeFromExtension(const String& extension); |
78 | 77 |
79 } | 78 } |
80 | 79 |
81 #endif | 80 #endif |
OLD | NEW |