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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 9751001: Don't allow a renderer to exit if we are using it in other views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove test for now. Created 8 years, 9 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 | « no previous file | no next file » | 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 iter.Advance(); 1243 iter.Advance();
1244 } 1244 }
1245 1245
1246 ClearTransportDIBCache(); 1246 ClearTransportDIBCache();
1247 1247
1248 // this object is not deleted at this point and may be reused later. 1248 // this object is not deleted at this point and may be reused later.
1249 // TODO(darin): clean this up 1249 // TODO(darin): clean this up
1250 } 1250 }
1251 1251
1252 void RenderProcessHostImpl::OnShutdownRequest() { 1252 void RenderProcessHostImpl::OnShutdownRequest() {
1253 // Don't shutdown if there are pending RenderViews being swapped back in. 1253 // Don't shut down if there are more RenderViews than the one asking to
1254 if (pending_views_) 1254 // close, or if there are pending RenderViews being swapped back in.
1255 if (pending_views_ || render_widget_hosts_.size() > 1)
1255 return; 1256 return;
1256 1257
1257 // Notify any tabs that might have swapped out renderers from this process. 1258 // Notify any tabs that might have swapped out renderers from this process.
1258 // They should not attempt to swap them back in. 1259 // They should not attempt to swap them back in.
1259 content::NotificationService::current()->Notify( 1260 content::NotificationService::current()->Notify(
1260 content::NOTIFICATION_RENDERER_PROCESS_CLOSING, 1261 content::NOTIFICATION_RENDERER_PROCESS_CLOSING,
1261 content::Source<RenderProcessHost>(this), 1262 content::Source<RenderProcessHost>(this),
1262 content::NotificationService::NoDetails()); 1263 content::NotificationService::NoDetails());
1263 1264
1264 Send(new ChildProcessMsg_Shutdown()); 1265 Send(new ChildProcessMsg_Shutdown());
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1337 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { 1338 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) {
1338 // Only honor the request if appropriate persmissions are granted. 1339 // Only honor the request if appropriate persmissions are granted.
1339 if (ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(GetID(), 1340 if (ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(GetID(),
1340 path)) 1341 path))
1341 content::GetContentClient()->browser()->OpenItem(path); 1342 content::GetContentClient()->browser()->OpenItem(path);
1342 } 1343 }
1343 1344
1344 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { 1345 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) {
1345 MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size); 1346 MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size);
1346 } 1347 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698