Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: Source/modules/plugins/DOMPluginArray.cpp

Issue 1107783002: Oilpan: have Navigator plugin objects on the heap by default. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/modules/plugins/DOMPluginArray.h ('k') | Source/modules/plugins/MimeType.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 28 matching lines...) Expand all
39 } 39 }
40 40
41 unsigned DOMPluginArray::length() const 41 unsigned DOMPluginArray::length() const
42 { 42 {
43 PluginData* data = pluginData(); 43 PluginData* data = pluginData();
44 if (!data) 44 if (!data)
45 return 0; 45 return 0;
46 return data->plugins().size(); 46 return data->plugins().size();
47 } 47 }
48 48
49 PassRefPtrWillBeRawPtr<DOMPlugin> DOMPluginArray::item(unsigned index) 49 DOMPlugin* DOMPluginArray::item(unsigned index)
50 { 50 {
51 PluginData* data = pluginData(); 51 PluginData* data = pluginData();
52 if (!data) 52 if (!data)
53 return nullptr; 53 return nullptr;
54 const Vector<PluginInfo>& plugins = data->plugins(); 54 const Vector<PluginInfo>& plugins = data->plugins();
55 if (index >= plugins.size()) 55 if (index >= plugins.size())
56 return nullptr; 56 return nullptr;
57 return DOMPlugin::create(data, m_frame, index); 57 return DOMPlugin::create(data, m_frame, index);
58 } 58 }
59 59
60 PassRefPtrWillBeRawPtr<DOMPlugin> DOMPluginArray::namedItem(const AtomicString& propertyName) 60 DOMPlugin* DOMPluginArray::namedItem(const AtomicString& propertyName)
61 { 61 {
62 PluginData* data = pluginData(); 62 PluginData* data = pluginData();
63 if (!data) 63 if (!data)
64 return nullptr; 64 return nullptr;
65 const Vector<PluginInfo>& plugins = data->plugins(); 65 const Vector<PluginInfo>& plugins = data->plugins();
66 for (unsigned i = 0; i < plugins.size(); ++i) { 66 for (unsigned i = 0; i < plugins.size(); ++i) {
67 if (plugins[i].name == propertyName) 67 if (plugins[i].name == propertyName)
68 return DOMPlugin::create(data, m_frame, i); 68 return DOMPlugin::create(data, m_frame, i);
69 } 69 }
70 return nullptr; 70 return nullptr;
(...skipping 12 matching lines...) Expand all
83 { 83 {
84 if (!m_frame) 84 if (!m_frame)
85 return nullptr; 85 return nullptr;
86 Page* page = m_frame->page(); 86 Page* page = m_frame->page();
87 if (!page) 87 if (!page)
88 return nullptr; 88 return nullptr;
89 return page->pluginData(); 89 return page->pluginData();
90 } 90 }
91 91
92 } // namespace blink 92 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/plugins/DOMPluginArray.h ('k') | Source/modules/plugins/MimeType.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698