| OLD | NEW |
| 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 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1240 iter.Advance(); | 1240 iter.Advance(); |
| 1241 } | 1241 } |
| 1242 | 1242 |
| 1243 ClearTransportDIBCache(); | 1243 ClearTransportDIBCache(); |
| 1244 | 1244 |
| 1245 // this object is not deleted at this point and may be reused later. | 1245 // this object is not deleted at this point and may be reused later. |
| 1246 // TODO(darin): clean this up | 1246 // TODO(darin): clean this up |
| 1247 } | 1247 } |
| 1248 | 1248 |
| 1249 void RenderProcessHostImpl::OnShutdownRequest() { | 1249 void RenderProcessHostImpl::OnShutdownRequest() { |
| 1250 // Don't shutdown if there are pending RenderViews being swapped back in. | 1250 // Don't shut down if there are more RenderViews than the one asking to |
| 1251 if (pending_views_) | 1251 // close, or if there are pending RenderViews being swapped back in. |
| 1252 if (pending_views_ || render_widget_hosts_.size() > 1) |
| 1252 return; | 1253 return; |
| 1253 | 1254 |
| 1254 // Notify any tabs that might have swapped out renderers from this process. | 1255 // Notify any tabs that might have swapped out renderers from this process. |
| 1255 // They should not attempt to swap them back in. | 1256 // They should not attempt to swap them back in. |
| 1256 content::NotificationService::current()->Notify( | 1257 content::NotificationService::current()->Notify( |
| 1257 content::NOTIFICATION_RENDERER_PROCESS_CLOSING, | 1258 content::NOTIFICATION_RENDERER_PROCESS_CLOSING, |
| 1258 content::Source<RenderProcessHost>(this), | 1259 content::Source<RenderProcessHost>(this), |
| 1259 content::NotificationService::NoDetails()); | 1260 content::NotificationService::NoDetails()); |
| 1260 | 1261 |
| 1261 Send(new ChildProcessMsg_Shutdown()); | 1262 Send(new ChildProcessMsg_Shutdown()); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1334 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { | 1335 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { |
| 1335 // Only honor the request if appropriate persmissions are granted. | 1336 // Only honor the request if appropriate persmissions are granted. |
| 1336 if (ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(GetID(), | 1337 if (ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(GetID(), |
| 1337 path)) | 1338 path)) |
| 1338 content::GetContentClient()->browser()->OpenItem(path); | 1339 content::GetContentClient()->browser()->OpenItem(path); |
| 1339 } | 1340 } |
| 1340 | 1341 |
| 1341 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { | 1342 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { |
| 1342 MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size); | 1343 MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size); |
| 1343 } | 1344 } |
| OLD | NEW |