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

Side by Side Diff: content/plugin/plugin_thread.cc

Issue 14081010: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some gtk issues Created 7 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 | « content/plugin/plugin_channel.cc ('k') | content/plugin/webplugin_delegate_stub.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/plugin/plugin_thread.h" 5 #include "content/plugin/plugin_thread.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(TOOLKIT_GTK) 9 #if defined(TOOLKIT_GTK)
10 #include <gtk/gtk.h> 10 #include <gtk/gtk.h>
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 ui::SetDefaultX11ErrorHandlers(); 110 ui::SetDefaultX11ErrorHandlers();
111 #endif 111 #endif
112 112
113 PatchNPNFunctions(); 113 PatchNPNFunctions();
114 114
115 // Preload the library to avoid loading, unloading then reloading 115 // Preload the library to avoid loading, unloading then reloading
116 preloaded_plugin_module_ = base::LoadNativeLibrary(plugin_path, NULL); 116 preloaded_plugin_module_ = base::LoadNativeLibrary(plugin_path, NULL);
117 117
118 scoped_refptr<webkit::npapi::PluginLib> plugin( 118 scoped_refptr<webkit::npapi::PluginLib> plugin(
119 webkit::npapi::PluginLib::CreatePluginLib(plugin_path)); 119 webkit::npapi::PluginLib::CreatePluginLib(plugin_path));
120 if (plugin.get()) { 120 if (plugin) {
121 plugin->NP_Initialize(); 121 plugin->NP_Initialize();
122 // For OOP plugins the plugin dll will be unloaded during process shutdown 122 // For OOP plugins the plugin dll will be unloaded during process shutdown
123 // time. 123 // time.
124 plugin->set_defer_unload(true); 124 plugin->set_defer_unload(true);
125 } 125 }
126 126
127 GetContentClient()->plugin()->PluginProcessStarted( 127 GetContentClient()->plugin()->PluginProcessStarted(
128 plugin.get() ? plugin->plugin_info().name : string16()); 128 plugin.get() ? plugin->plugin_info().name : string16());
129 129
130 GetContentClient()->AddNPAPIPlugins( 130 GetContentClient()->AddNPAPIPlugins(
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 IPC_MESSAGE_UNHANDLED(handled = false) 163 IPC_MESSAGE_UNHANDLED(handled = false)
164 IPC_END_MESSAGE_MAP() 164 IPC_END_MESSAGE_MAP()
165 return handled; 165 return handled;
166 } 166 }
167 167
168 void PluginThread::OnCreateChannel(int renderer_id, 168 void PluginThread::OnCreateChannel(int renderer_id,
169 bool incognito) { 169 bool incognito) {
170 scoped_refptr<PluginChannel> channel(PluginChannel::GetPluginChannel( 170 scoped_refptr<PluginChannel> channel(PluginChannel::GetPluginChannel(
171 renderer_id, ChildProcess::current()->io_message_loop_proxy())); 171 renderer_id, ChildProcess::current()->io_message_loop_proxy()));
172 IPC::ChannelHandle channel_handle; 172 IPC::ChannelHandle channel_handle;
173 if (channel.get()) { 173 if (channel) {
174 channel_handle.name = channel->channel_handle().name; 174 channel_handle.name = channel->channel_handle().name;
175 #if defined(OS_POSIX) 175 #if defined(OS_POSIX)
176 // On POSIX, pass the renderer-side FD. 176 // On POSIX, pass the renderer-side FD.
177 channel_handle.socket = 177 channel_handle.socket =
178 base::FileDescriptor(channel->TakeRendererFileDescriptor(), true); 178 base::FileDescriptor(channel->TakeRendererFileDescriptor(), true);
179 #endif 179 #endif
180 channel->set_incognito(incognito); 180 channel->set_incognito(incognito);
181 } 181 }
182 182
183 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); 183 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle));
184 } 184 }
185 185
186 void PluginThread::OnNotifyRenderersOfPendingShutdown() { 186 void PluginThread::OnNotifyRenderersOfPendingShutdown() {
187 PluginChannel::NotifyRenderersOfPendingShutdown(); 187 PluginChannel::NotifyRenderersOfPendingShutdown();
188 } 188 }
189 189
190 } // namespace content 190 } // namespace content
OLDNEW
« no previous file with comments | « content/plugin/plugin_channel.cc ('k') | content/plugin/webplugin_delegate_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698