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

Side by Side Diff: chrome/plugin/plugin_channel.cc

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 years, 1 month 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 | « chrome/common/webmessageportchannel_impl.cc ('k') | chrome/plugin/plugin_thread.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/plugin/plugin_channel.h" 5 #include "chrome/plugin/plugin_channel.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lock.h" 8 #include "base/lock.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 IPC_MESSAGE_HANDLER_DELAY_REPLY(PluginMsg_DestroyInstance, 211 IPC_MESSAGE_HANDLER_DELAY_REPLY(PluginMsg_DestroyInstance,
212 OnDestroyInstance) 212 OnDestroyInstance)
213 IPC_MESSAGE_HANDLER(PluginMsg_GenerateRouteID, OnGenerateRouteID) 213 IPC_MESSAGE_HANDLER(PluginMsg_GenerateRouteID, OnGenerateRouteID)
214 IPC_MESSAGE_UNHANDLED_ERROR() 214 IPC_MESSAGE_UNHANDLED_ERROR()
215 IPC_END_MESSAGE_MAP() 215 IPC_END_MESSAGE_MAP()
216 } 216 }
217 217
218 void PluginChannel::OnCreateInstance(const std::string& mime_type, 218 void PluginChannel::OnCreateInstance(const std::string& mime_type,
219 int* instance_id) { 219 int* instance_id) {
220 *instance_id = GenerateRouteID(); 220 *instance_id = GenerateRouteID();
221 scoped_refptr<WebPluginDelegateStub> stub = new WebPluginDelegateStub( 221 scoped_refptr<WebPluginDelegateStub> stub(new WebPluginDelegateStub(
222 mime_type, *instance_id, this); 222 mime_type, *instance_id, this));
223 AddRoute(*instance_id, stub, NULL); 223 AddRoute(*instance_id, stub, NULL);
224 plugin_stubs_.push_back(stub); 224 plugin_stubs_.push_back(stub);
225 } 225 }
226 226
227 void PluginChannel::OnDestroyInstance(int instance_id, 227 void PluginChannel::OnDestroyInstance(int instance_id,
228 IPC::Message* reply_msg) { 228 IPC::Message* reply_msg) {
229 for (size_t i = 0; i < plugin_stubs_.size(); ++i) { 229 for (size_t i = 0; i < plugin_stubs_.size(); ++i) {
230 if (plugin_stubs_[i]->instance_id() == instance_id) { 230 if (plugin_stubs_[i]->instance_id() == instance_id) {
231 scoped_refptr<MessageFilter> filter(filter_); 231 scoped_refptr<MessageFilter> filter(filter_);
232 gfx::NativeViewId window = 232 gfx::NativeViewId window =
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 325
326 #if defined(OS_POSIX) 326 #if defined(OS_POSIX)
327 void PluginChannel::CloseRendererFD() { 327 void PluginChannel::CloseRendererFD() {
328 if (renderer_fd_ != -1) { 328 if (renderer_fd_ != -1) {
329 if (HANDLE_EINTR(close(renderer_fd_)) < 0) 329 if (HANDLE_EINTR(close(renderer_fd_)) < 0)
330 PLOG(ERROR) << "close"; 330 PLOG(ERROR) << "close";
331 renderer_fd_ = -1; 331 renderer_fd_ = -1;
332 } 332 }
333 } 333 }
334 #endif 334 #endif
OLDNEW
« no previous file with comments | « chrome/common/webmessageportchannel_impl.cc ('k') | chrome/plugin/plugin_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698