| 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 * Copyright (C) 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Lesser General Public | 6 * modify it under the terms of the GNU Lesser General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 } | 46 } |
| 47 | 47 |
| 48 DOMPlugin* DOMPluginArray::item(unsigned index) | 48 DOMPlugin* DOMPluginArray::item(unsigned index) |
| 49 { | 49 { |
| 50 PluginData* data = pluginData(); | 50 PluginData* data = pluginData(); |
| 51 if (!data) | 51 if (!data) |
| 52 return nullptr; | 52 return nullptr; |
| 53 const Vector<PluginInfo>& plugins = data->plugins(); | 53 const Vector<PluginInfo>& plugins = data->plugins(); |
| 54 if (index >= plugins.size()) | 54 if (index >= plugins.size()) |
| 55 return nullptr; | 55 return nullptr; |
| 56 return DOMPlugin::create(data, m_frame, index); | 56 return DOMPlugin::create(data, frame(), index); |
| 57 } | 57 } |
| 58 | 58 |
| 59 DOMPlugin* DOMPluginArray::namedItem(const AtomicString& propertyName) | 59 DOMPlugin* DOMPluginArray::namedItem(const AtomicString& propertyName) |
| 60 { | 60 { |
| 61 PluginData* data = pluginData(); | 61 PluginData* data = pluginData(); |
| 62 if (!data) | 62 if (!data) |
| 63 return nullptr; | 63 return nullptr; |
| 64 const Vector<PluginInfo>& plugins = data->plugins(); | 64 const Vector<PluginInfo>& plugins = data->plugins(); |
| 65 for (unsigned i = 0; i < plugins.size(); ++i) { | 65 for (unsigned i = 0; i < plugins.size(); ++i) { |
| 66 if (plugins[i].name == propertyName) | 66 if (plugins[i].name == propertyName) |
| 67 return DOMPlugin::create(data, m_frame, i); | 67 return DOMPlugin::create(data, frame(), i); |
| 68 } | 68 } |
| 69 return nullptr; | 69 return nullptr; |
| 70 } | 70 } |
| 71 | 71 |
| 72 void DOMPluginArray::refresh(bool reload) | 72 void DOMPluginArray::refresh(bool reload) |
| 73 { | 73 { |
| 74 if (!m_frame) | 74 if (!frame()) |
| 75 return; | 75 return; |
| 76 Page::refreshPlugins(); | 76 Page::refreshPlugins(); |
| 77 if (reload) | 77 if (reload) |
| 78 m_frame->reload(FrameLoadTypeReload, ClientRedirectPolicy::ClientRedirec
t); | 78 frame()->reload(FrameLoadTypeReload, ClientRedirectPolicy::ClientRedirec
t); |
| 79 } | 79 } |
| 80 | 80 |
| 81 PluginData* DOMPluginArray::pluginData() const | 81 PluginData* DOMPluginArray::pluginData() const |
| 82 { | 82 { |
| 83 if (!m_frame) | 83 if (!frame()) |
| 84 return nullptr; | 84 return nullptr; |
| 85 return m_frame->pluginData(); | 85 return frame()->pluginData(); |
| 86 } | 86 } |
| 87 | 87 |
| 88 } // namespace blink | 88 } // namespace blink |
| OLD | NEW |