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

Side by Side Diff: content/common/npobject_stub.cc

Issue 14335017: content: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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/common/gpu/gpu_memory_manager.cc ('k') | content/common/resource_dispatcher.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/common/npobject_stub.h" 5 #include "content/common/npobject_stub.h"
6 6
7 #include "content/common/np_channel_base.h" 7 #include "content/common/np_channel_base.h"
8 #include "content/common/npobject_util.h" 8 #include "content/common/npobject_util.h"
9 #include "content/common/plugin_messages.h" 9 #include "content/common/plugin_messages.h"
10 #include "content/public/common/content_client.h" 10 #include "content/public/common/content_client.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 channel_->RemoveMappingForNPObjectStub(route_id_, npobject_); 51 channel_->RemoveMappingForNPObjectStub(route_id_, npobject_);
52 52
53 // We need to NULL npobject_ prior to calling releaseObject() to avoid 53 // We need to NULL npobject_ prior to calling releaseObject() to avoid
54 // problems with re-entrancy. See http://crbug.com/94179#c17 for more 54 // problems with re-entrancy. See http://crbug.com/94179#c17 for more
55 // details on how this can happen. 55 // details on how this can happen.
56 NPObject* npobject = npobject_; 56 NPObject* npobject = npobject_;
57 npobject_ = NULL; 57 npobject_ = NULL;
58 58
59 WebBindings::releaseObject(npobject); 59 WebBindings::releaseObject(npobject);
60 60
61 MessageLoop::current()->DeleteSoon(FROM_HERE, this); 61 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
62 } 62 }
63 } 63 }
64 64
65 bool NPObjectStub::Send(IPC::Message* msg) { 65 bool NPObjectStub::Send(IPC::Message* msg) {
66 return channel_->Send(msg); 66 return channel_->Send(msg);
67 } 67 }
68 68
69 NPObject* NPObjectStub::GetUnderlyingNPObject() { 69 NPObject* NPObjectStub::GetUnderlyingNPObject() {
70 return npobject_; 70 return npobject_;
71 } 71 }
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 &script_string, &result_var); 394 &script_string, &result_var);
395 395
396 NPVariant_Param result_param; 396 NPVariant_Param result_param;
397 CreateNPVariantParam( 397 CreateNPVariantParam(
398 result_var, channel_, &result_param, true, render_view_id_, page_url_); 398 result_var, channel_, &result_param, true, render_view_id_, page_url_);
399 NPObjectMsg_Evaluate::WriteReplyParams(reply_msg, result_param, return_value); 399 NPObjectMsg_Evaluate::WriteReplyParams(reply_msg, result_param, return_value);
400 channel_->Send(reply_msg); 400 channel_->Send(reply_msg);
401 } 401 }
402 402
403 } // namespace content 403 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_memory_manager.cc ('k') | content/common/resource_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698