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

Unified Diff: chrome/browser/memory_details.cc

Issue 2694363007: Add memory and CPU histogram for OOPIF
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/memory_details.cc
diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc
index 17118cbf696a6792858ae166d3ee5efafdddfa56..a06c43532f39a7245357bc5f9dda2fdb805b79e5 100644
--- a/chrome/browser/memory_details.cc
+++ b/chrome/browser/memory_details.cc
@@ -29,6 +29,7 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_iterator.h"
+#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/bindings_policy.h"
#include "content/public/common/content_constants.h"
@@ -53,6 +54,7 @@ using content::BrowserThread;
using content::NavigationEntry;
using content::RenderViewHost;
using content::RenderWidgetHost;
+using content::RenderWidgetHostView;
using content::WebContents;
#if BUILDFLAG(ENABLE_EXTENSIONS)
using extensions::Extension;
@@ -276,6 +278,10 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
for (content::RenderWidgetHost* widget : widgets_by_pid[process.pid]) {
DCHECK_EQ(render_process_host, widget->GetProcess());
+ RenderWidgetHostView* rwhv = widget->GetView();
+ if (rwhv && rwhv->IsRenderWidgetHostViewChildFrame())
+ process.contains_oopif = true;
+
RenderViewHost* rvh = RenderViewHost::From(widget);
if (!rvh)
continue;

Powered by Google App Engine
This is Rietveld 408576698