| 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 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1217                                            base::TerminationStatus status, |  1217                                            base::TerminationStatus status, | 
|  1218                                            int exit_code, |  1218                                            int exit_code, | 
|  1219                                            bool was_alive) { |  1219                                            bool was_alive) { | 
|  1220   // Our child process has died.  If we didn't expect it, it's a crash. |  1220   // Our child process has died.  If we didn't expect it, it's a crash. | 
|  1221   // In any case, we need to let everyone know it's gone. |  1221   // In any case, we need to let everyone know it's gone. | 
|  1222   // The OnChannelError notification can fire multiple times due to nested sync |  1222   // The OnChannelError notification can fire multiple times due to nested sync | 
|  1223   // calls to a renderer. If we don't have a valid channel here it means we |  1223   // calls to a renderer. If we don't have a valid channel here it means we | 
|  1224   // already handled the error. |  1224   // already handled the error. | 
|  1225  |  1225  | 
|  1226   RendererClosedDetails details(handle, status, exit_code, was_alive); |  1226   RendererClosedDetails details(handle, status, exit_code, was_alive); | 
 |  1227  | 
 |  1228 #if defined(OS_WIN) | 
 |  1229   // We must record data from handle before notifications, which can close the | 
 |  1230   // handle. | 
 |  1231   details.RecordProcessStats(); | 
 |  1232 #endif   // OS_WIN | 
 |  1233  | 
|  1227   content::NotificationService::current()->Notify( |  1234   content::NotificationService::current()->Notify( | 
|  1228       content::NOTIFICATION_RENDERER_PROCESS_CLOSED, |  1235       content::NOTIFICATION_RENDERER_PROCESS_CLOSED, | 
|  1229       content::Source<RenderProcessHost>(this), |  1236       content::Source<RenderProcessHost>(this), | 
|  1230       content::Details<RendererClosedDetails>(&details)); |  1237       content::Details<RendererClosedDetails>(&details)); | 
|  1231  |  1238  | 
|  1232   child_process_launcher_.reset(); |  1239   child_process_launcher_.reset(); | 
|  1233   channel_.reset(); |  1240   channel_.reset(); | 
|  1234   gpu_message_filter_ = NULL; |  1241   gpu_message_filter_ = NULL; | 
|  1235  |  1242  | 
|  1236   IDMap<RenderWidgetHost>::iterator iter(&render_widget_hosts_); |  1243   IDMap<RenderWidgetHost>::iterator iter(&render_widget_hosts_); | 
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1336 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { |  1343 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { | 
|  1337   // Only honor the request if appropriate persmissions are granted. |  1344   // Only honor the request if appropriate persmissions are granted. | 
|  1338   if (ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(GetID(), |  1345   if (ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(GetID(), | 
|  1339                                                                  path)) |  1346                                                                  path)) | 
|  1340     content::GetContentClient()->browser()->OpenItem(path); |  1347     content::GetContentClient()->browser()->OpenItem(path); | 
|  1341 } |  1348 } | 
|  1342  |  1349  | 
|  1343 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { |  1350 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { | 
|  1344   MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size); |  1351   MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size); | 
|  1345 } |  1352 } | 
| OLD | NEW |