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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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/core/plugins/DOMPlugin.cpp ('k') | Source/core/rendering/AbstractInlineTextBox.cpp » ('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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 PluginData* data = pluginData(); 44 PluginData* data = pluginData();
45 if (!data) 45 if (!data)
46 return 0; 46 return 0;
47 return data->plugins().size(); 47 return data->plugins().size();
48 } 48 }
49 49
50 PassRefPtrWillBeRawPtr<DOMPlugin> DOMPluginArray::item(unsigned index) 50 PassRefPtrWillBeRawPtr<DOMPlugin> DOMPluginArray::item(unsigned index)
51 { 51 {
52 PluginData* data = pluginData(); 52 PluginData* data = pluginData();
53 if (!data) 53 if (!data)
54 return 0; 54 return nullptr;
55 const Vector<PluginInfo>& plugins = data->plugins(); 55 const Vector<PluginInfo>& plugins = data->plugins();
56 if (index >= plugins.size()) 56 if (index >= plugins.size())
57 return 0; 57 return nullptr;
58 return DOMPlugin::create(data, m_frame, index).get(); 58 return DOMPlugin::create(data, m_frame, index).get();
59 } 59 }
60 60
61 bool DOMPluginArray::canGetItemsForName(const AtomicString& propertyName) 61 bool DOMPluginArray::canGetItemsForName(const AtomicString& propertyName)
62 { 62 {
63 PluginData* data = pluginData(); 63 PluginData* data = pluginData();
64 if (!data) 64 if (!data)
65 return 0; 65 return 0;
66 const Vector<PluginInfo>& plugins = data->plugins(); 66 const Vector<PluginInfo>& plugins = data->plugins();
67 for (unsigned i = 0; i < plugins.size(); ++i) { 67 for (unsigned i = 0; i < plugins.size(); ++i) {
68 if (plugins[i].name == propertyName) 68 if (plugins[i].name == propertyName)
69 return true; 69 return true;
70 } 70 }
71 return false; 71 return false;
72 } 72 }
73 73
74 PassRefPtrWillBeRawPtr<DOMPlugin> DOMPluginArray::namedItem(const AtomicString& propertyName) 74 PassRefPtrWillBeRawPtr<DOMPlugin> DOMPluginArray::namedItem(const AtomicString& propertyName)
75 { 75 {
76 PluginData* data = pluginData(); 76 PluginData* data = pluginData();
77 if (!data) 77 if (!data)
78 return 0; 78 return nullptr;
79 const Vector<PluginInfo>& plugins = data->plugins(); 79 const Vector<PluginInfo>& plugins = data->plugins();
80 for (unsigned i = 0; i < plugins.size(); ++i) { 80 for (unsigned i = 0; i < plugins.size(); ++i) {
81 if (plugins[i].name == propertyName) 81 if (plugins[i].name == propertyName)
82 return DOMPlugin::create(data, m_frame, i).get(); 82 return DOMPlugin::create(data, m_frame, i).get();
83 } 83 }
84 return 0; 84 return nullptr;
85 } 85 }
86 86
87 void DOMPluginArray::refresh(bool reload) 87 void DOMPluginArray::refresh(bool reload)
88 { 88 {
89 Page::refreshPlugins(reload); 89 Page::refreshPlugins(reload);
90 } 90 }
91 91
92 PluginData* DOMPluginArray::pluginData() const 92 PluginData* DOMPluginArray::pluginData() const
93 { 93 {
94 if (!m_frame) 94 if (!m_frame)
95 return 0; 95 return 0;
96 Page* page = m_frame->page(); 96 Page* page = m_frame->page();
97 if (!page) 97 if (!page)
98 return 0; 98 return 0;
99 return page->pluginData(); 99 return page->pluginData();
100 } 100 }
101 101
102 } // namespace WebCore 102 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/plugins/DOMPlugin.cpp ('k') | Source/core/rendering/AbstractInlineTextBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698