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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 10409088: Get rid of the RenderViewType concept in content, since it was only used by Chrome. Store the enum… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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/automation/testing_automation_provider.cc
===================================================================
--- chrome/browser/automation/testing_automation_provider.cc (revision 138369)
+++ chrome/browser/automation/testing_automation_provider.cc (working copy)
@@ -136,7 +136,6 @@
#include "content/public/browser/plugin_service.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
-#include "content/public/browser/render_view_host_delegate.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/child_process_host.h"
@@ -2411,7 +2410,10 @@
render_view_host->GetRoutingID());
item->Set("view", view);
std::string type;
- switch (render_view_host->GetDelegate()->GetRenderViewType()) {
+ WebContents* web_contents =
+ WebContents::FromRenderViewHost(render_view_host);
+ chrome::ViewType view_type = chrome::GetViewType(web_contents);
+ switch (view_type) {
case chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE:
type = "EXTENSION_BACKGROUND_PAGE";
break;
@@ -2435,7 +2437,7 @@
break;
}
item->SetString("view_type", type);
- item->SetString("url", render_view_host->GetDelegate()->GetURL().spec());
+ item->SetString("url", web_contents->GetURL().spec());
item->SetBoolean("loaded", !render_view_host->IsLoading());
extension_views->Append(item);
}

Powered by Google App Engine
This is Rietveld 408576698