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 |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "core/loader/FrameLoader.h" | 23 #include "core/loader/FrameLoader.h" |
24 #include "core/page/Page.h" | 24 #include "core/page/Page.h" |
25 #include "modules/plugins/DOMPlugin.h" | 25 #include "modules/plugins/DOMPlugin.h" |
26 #include "wtf/text/StringBuilder.h" | 26 #include "wtf/text/StringBuilder.h" |
27 | 27 |
28 namespace blink { | 28 namespace blink { |
29 | 29 |
30 DOMMimeType::DOMMimeType(PassRefPtr<PluginData> pluginData, | 30 DOMMimeType::DOMMimeType(PassRefPtr<PluginData> pluginData, |
31 LocalFrame* frame, | 31 LocalFrame* frame, |
32 unsigned index) | 32 unsigned index) |
33 : ContextClient(frame), m_pluginData(pluginData), m_index(index) {} | 33 : ContextClient(frame), |
| 34 m_pluginData(std::move(pluginData)), |
| 35 m_index(index) {} |
34 | 36 |
35 DOMMimeType::~DOMMimeType() {} | 37 DOMMimeType::~DOMMimeType() {} |
36 | 38 |
37 DEFINE_TRACE(DOMMimeType) { | 39 DEFINE_TRACE(DOMMimeType) { |
38 ContextClient::trace(visitor); | 40 ContextClient::trace(visitor); |
39 } | 41 } |
40 | 42 |
41 const String& DOMMimeType::type() const { | 43 const String& DOMMimeType::type() const { |
42 return mimeClassInfo().type; | 44 return mimeClassInfo().type; |
43 } | 45 } |
(...skipping 19 matching lines...) Expand all Loading... |
63 // to bounce through the loader to get there. | 65 // to bounce through the loader to get there. |
64 // Something like: frame()->host()->client()->allowPlugins(). | 66 // Something like: frame()->host()->client()->allowPlugins(). |
65 if (!frame() || !frame()->loader().allowPlugins(NotAboutToInstantiatePlugin)) | 67 if (!frame() || !frame()->loader().allowPlugins(NotAboutToInstantiatePlugin)) |
66 return nullptr; | 68 return nullptr; |
67 | 69 |
68 return DOMPlugin::create(m_pluginData.get(), frame(), | 70 return DOMPlugin::create(m_pluginData.get(), frame(), |
69 m_pluginData->mimePluginIndices()[m_index]); | 71 m_pluginData->mimePluginIndices()[m_index]); |
70 } | 72 } |
71 | 73 |
72 } // namespace blink | 74 } // namespace blink |
OLD | NEW |