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

Side by Side Diff: chrome/browser/task_manager/task_manager_resource_providers.cc

Issue 11772005: Implement a prototype to render cross-site iframes in a separate process from their parent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing Task Manager code and fixing issues raised by Charlie. Created 7 years, 11 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/task_manager/task_manager_resource_providers.h" 5 #include "chrome/browser/task_manager/task_manager_resource_providers.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after
1856 // Add all the existing guest WebContents. 1856 // Add all the existing guest WebContents.
1857 for (RenderProcessHost::iterator i( 1857 for (RenderProcessHost::iterator i(
1858 RenderProcessHost::AllHostsIterator()); 1858 RenderProcessHost::AllHostsIterator());
1859 !i.IsAtEnd(); i.Advance()) { 1859 !i.IsAtEnd(); i.Advance()) {
1860 RenderProcessHost* host = i.GetCurrentValue(); 1860 RenderProcessHost* host = i.GetCurrentValue();
1861 if (host->IsGuest()) { 1861 if (host->IsGuest()) {
1862 RenderProcessHost::RenderWidgetHostsIterator iter = 1862 RenderProcessHost::RenderWidgetHostsIterator iter =
1863 host->GetRenderWidgetHostsIterator(); 1863 host->GetRenderWidgetHostsIterator();
1864 for (; !iter.IsAtEnd(); iter.Advance()) { 1864 for (; !iter.IsAtEnd(); iter.Advance()) {
1865 const RenderWidgetHost* widget = iter.GetCurrentValue(); 1865 const RenderWidgetHost* widget = iter.GetCurrentValue();
1866 Add(RenderViewHost::From( 1866 Add(RenderViewHost::From(const_cast<RenderWidgetHost*>(widget)));
Charlie Reis 2013/01/18 05:37:07 Nit: Might as well put this back to avoid the chur
nasko 2013/01/18 19:09:42 Done.
1867 const_cast<RenderWidgetHost*>(widget)));
1868 } 1867 }
1869 } 1868 }
1870 } 1869 }
1871 1870
1872 // Then we register for notifications to get new guests. 1871 // Then we register for notifications to get new guests.
1873 registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_CONNECTED, 1872 registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_CONNECTED,
1874 content::NotificationService::AllBrowserContextsAndSources()); 1873 content::NotificationService::AllBrowserContextsAndSources());
1875 registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, 1874 registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED,
1876 content::NotificationService::AllBrowserContextsAndSources()); 1875 content::NotificationService::AllBrowserContextsAndSources());
1877 } 1876 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1926 case content::NOTIFICATION_WEB_CONTENTS_CONNECTED: 1925 case content::NOTIFICATION_WEB_CONTENTS_CONNECTED:
1927 Add(web_contents->GetRenderViewHost()); 1926 Add(web_contents->GetRenderViewHost());
1928 break; 1927 break;
1929 case content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED: 1928 case content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED:
1930 Remove(web_contents->GetRenderViewHost()); 1929 Remove(web_contents->GetRenderViewHost());
1931 break; 1930 break;
1932 default: 1931 default:
1933 NOTREACHED() << "Unexpected notification."; 1932 NOTREACHED() << "Unexpected notification.";
1934 } 1933 }
1935 } 1934 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698