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

Unified Diff: chrome/browser/memory_details.cc

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for initial review. Created 8 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 ea3985c7d61fb47c4c2c43d73cbb8a4f54c16397..bbe1263ff154d0efbea3ff8ce13175e340583b2c 100644
--- a/chrome/browser/memory_details.cc
+++ b/chrome/browser/memory_details.cc
@@ -206,24 +206,26 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
if (!widget || !widget->IsRenderView())
continue;
- const RenderViewHost* host = static_cast<const RenderViewHost*>(widget);
- content::RenderViewHostDelegate* host_delegate = host->delegate();
+ const RenderViewHost* host = static_cast<const RenderViewHostImpl*>(
+ const_cast<RenderWidgetHost*>(widget)->AsRWHImpl());
jam 2012/02/29 01:40:47 nit: i guess this (and other usage in chrome) is a
Jói 2012/03/02 10:40:36 Ah, this was an oversight. Once I move RenderWidg
+ content::RenderViewHostDelegate* host_delegate = host->GetDelegate();
DCHECK(host_delegate);
GURL url = host_delegate->GetURL();
content::ViewType type = host_delegate->GetRenderViewType();
- if (host->enabled_bindings() & content::BINDINGS_POLICY_WEB_UI) {
+ if (host->GetEnabledBindings() & content::BINDINGS_POLICY_WEB_UI) {
// TODO(erikkay) the type for devtools doesn't actually appear to
// be set.
if (type == content::VIEW_TYPE_DEV_TOOLS_UI)
process.renderer_type = ProcessMemoryInformation::RENDERER_DEVTOOLS;
else
process.renderer_type = ProcessMemoryInformation::RENDERER_CHROME;
- } else if (extension_process_map->Contains(host->process()->GetID())) {
+ } else if (extension_process_map->Contains(
+ host->GetProcess()->GetID())) {
// For our purposes, don't count processes containing only hosted apps
// as extension processes. See also: crbug.com/102533.
std::set<std::string> extension_ids =
extension_process_map->GetExtensionsInProcess(
- host->process()->GetID());
+ host->GetProcess()->GetID());
for (std::set<std::string>::iterator iter = extension_ids.begin();
iter != extension_ids.end(); ++iter) {
const Extension* extension =
@@ -237,7 +239,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
}
WebContents* contents = host_delegate->GetAsWebContents();
if (!contents) {
- if (extension_process_map->Contains(host->process()->GetID())) {
+ if (extension_process_map->Contains(host->GetProcess()->GetID())) {
const Extension* extension =
extension_service->extensions()->GetByID(url.host());
if (extension) {

Powered by Google App Engine
This is Rietveld 408576698