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

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

Issue 18167004: Iterate over listeners when sending process died notification. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added DISALLOW_COPY_AND_ASSIGN() Created 7 years, 5 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 | « chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc ('k') | 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 #include <algorithm> 10 #include <algorithm>
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 RendererClosedDetails details(GetHandle(), status, exit_code); 1604 RendererClosedDetails details(GetHandle(), status, exit_code);
1605 NotificationService::current()->Notify( 1605 NotificationService::current()->Notify(
1606 NOTIFICATION_RENDERER_PROCESS_CLOSED, 1606 NOTIFICATION_RENDERER_PROCESS_CLOSED,
1607 Source<RenderProcessHost>(this), 1607 Source<RenderProcessHost>(this),
1608 Details<RendererClosedDetails>(&details)); 1608 Details<RendererClosedDetails>(&details));
1609 1609
1610 child_process_launcher_.reset(); 1610 child_process_launcher_.reset();
1611 channel_.reset(); 1611 channel_.reset();
1612 gpu_message_filter_ = NULL; 1612 gpu_message_filter_ = NULL;
1613 1613
1614 RenderWidgetHost::List widgets = RenderWidgetHost::GetRenderWidgetHosts(); 1614 IDMap<IPC::Listener>::iterator iter(&listeners_);
1615 for (size_t i = 0; i < widgets.size(); ++i) { 1615 while (!iter.IsAtEnd()) {
1616 if (widgets[i]->GetProcess()->GetID() != GetID()) 1616 iter.GetCurrentValue()->OnMessageReceived(
1617 continue; 1617 ViewHostMsg_RenderViewGone(iter.GetCurrentKey(),
1618 RenderWidgetHostImpl::From(widgets[i])->OnMessageReceived(
1619 ViewHostMsg_RenderViewGone(widgets[i]->GetRoutingID(),
1620 static_cast<int>(status), 1618 static_cast<int>(status),
1621 exit_code)); 1619 exit_code));
1620 iter.Advance();
1622 } 1621 }
1623 1622
1624 ClearTransportDIBCache(); 1623 ClearTransportDIBCache();
1625 1624
1626 // this object is not deleted at this point and may be reused later. 1625 // this object is not deleted at this point and may be reused later.
1627 // TODO(darin): clean this up 1626 // TODO(darin): clean this up
1628 } 1627 }
1629 1628
1630 int RenderProcessHostImpl::GetActiveViewCount() { 1629 int RenderProcessHostImpl::GetActiveViewCount() {
1631 int num_active_views = 0; 1630 int num_active_views = 0;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1783 // Skip widgets in other processes. 1782 // Skip widgets in other processes.
1784 if (widgets[i]->GetProcess()->GetID() != GetID()) 1783 if (widgets[i]->GetProcess()->GetID() != GetID())
1785 continue; 1784 continue;
1786 1785
1787 RenderViewHost* rvh = RenderViewHost::From(widgets[i]); 1786 RenderViewHost* rvh = RenderViewHost::From(widgets[i]);
1788 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); 1787 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences());
1789 } 1788 }
1790 } 1789 }
1791 1790
1792 } // namespace content 1791 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698