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

Side by Side Diff: content/public/test/mock_render_process_host.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
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/public/test/mock_render_process_host.h" 5 #include "content/public/test/mock_render_process_host.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "content/browser/child_process_security_policy_impl.h" 10 #include "content/browser/child_process_security_policy_impl.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 render_widget_hosts_.Remove(routing_id); 161 render_widget_hosts_.Remove(routing_id);
162 Cleanup(); 162 Cleanup();
163 } 163 }
164 164
165 void MockRenderProcessHost::Cleanup() { 165 void MockRenderProcessHost::Cleanup() {
166 if (render_widget_hosts_.IsEmpty()) { 166 if (render_widget_hosts_.IsEmpty()) {
167 NotificationService::current()->Notify( 167 NotificationService::current()->Notify(
168 NOTIFICATION_RENDERER_PROCESS_TERMINATED, 168 NOTIFICATION_RENDERER_PROCESS_TERMINATED,
169 Source<RenderProcessHost>(this), 169 Source<RenderProcessHost>(this),
170 NotificationService::NoDetails()); 170 NotificationService::NoDetails());
171 MessageLoop::current()->DeleteSoon(FROM_HERE, this); 171 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
172 RenderProcessHostImpl::UnregisterHost(GetID()); 172 RenderProcessHostImpl::UnregisterHost(GetID());
173 } 173 }
174 } 174 }
175 175
176 void MockRenderProcessHost::AddPendingView() { 176 void MockRenderProcessHost::AddPendingView() {
177 } 177 }
178 178
179 void MockRenderProcessHost::RemovePendingView() { 179 void MockRenderProcessHost::RemovePendingView() {
180 } 180 }
181 181
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); 258 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin();
259 it != processes_.end(); ++it) { 259 it != processes_.end(); ++it) {
260 if (*it == host) { 260 if (*it == host) {
261 processes_.weak_erase(it); 261 processes_.weak_erase(it);
262 break; 262 break;
263 } 263 }
264 } 264 }
265 } 265 }
266 266
267 } // content 267 } // content
OLDNEW
« no previous file with comments | « content/public/test/fake_speech_recognition_manager.cc ('k') | content/public/test/mock_render_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698