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 |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 * Lesser General Public License for more details. | 12 * Lesser General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU Lesser General Public | 14 * You should have received a copy of the GNU Lesser General Public |
15 * License along with this library; if not, write to the Free Software | 15 * License along with this library; if not, write to the Free Software |
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 U
SA | 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 U
SA |
17 */ | 17 */ |
18 | 18 |
19 #include "config.h" | 19 #include "config.h" |
20 #include "core/plugins/DOMMimeType.h" | 20 #include "core/plugins/DOMMimeType.h" |
21 | 21 |
22 #include "core/loader/FrameLoader.h" | 22 #include "core/loader/FrameLoader.h" |
23 #include "core/loader/FrameLoaderClient.h" | |
24 #include "core/page/Frame.h" | 23 #include "core/page/Frame.h" |
25 #include "core/page/Page.h" | 24 #include "core/page/Page.h" |
26 #include "core/page/Settings.h" | |
27 #include "core/plugins/DOMPlugin.h" | 25 #include "core/plugins/DOMPlugin.h" |
28 #include "core/plugins/PluginData.h" | 26 #include "core/plugins/PluginData.h" |
29 #include <wtf/text/StringBuilder.h> | 27 #include <wtf/text/StringBuilder.h> |
30 | 28 |
31 namespace WebCore { | 29 namespace WebCore { |
32 | 30 |
33 DOMMimeType::DOMMimeType(PassRefPtr<PluginData> pluginData, Frame* frame, unsign
ed index) | 31 DOMMimeType::DOMMimeType(PassRefPtr<PluginData> pluginData, Frame* frame, unsign
ed index) |
34 : FrameDestructionObserver(frame) | 32 : FrameDestructionObserver(frame) |
35 , m_pluginData(pluginData) | 33 , m_pluginData(pluginData) |
36 , m_index(index) | 34 , m_index(index) |
(...skipping 30 matching lines...) Expand all Loading... |
67 | 65 |
68 PassRefPtr<DOMPlugin> DOMMimeType::enabledPlugin() const | 66 PassRefPtr<DOMPlugin> DOMMimeType::enabledPlugin() const |
69 { | 67 { |
70 if (!m_frame || !m_frame->page() || !m_frame->page()->mainFrame()->loader()-
>subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin)) | 68 if (!m_frame || !m_frame->page() || !m_frame->page()->mainFrame()->loader()-
>subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin)) |
71 return 0; | 69 return 0; |
72 | 70 |
73 return DOMPlugin::create(m_pluginData.get(), m_frame, m_pluginData->mimePlug
inIndices()[m_index]); | 71 return DOMPlugin::create(m_pluginData.get(), m_frame, m_pluginData->mimePlug
inIndices()[m_index]); |
74 } | 72 } |
75 | 73 |
76 } // namespace WebCore | 74 } // namespace WebCore |
OLD | NEW |