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

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: review comments 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)
@@ -111,13 +111,13 @@
#include "chrome/browser/ui/omnibox/omnibox_view.h"
#include "chrome/browser/ui/search_engines/keyword_editor_controller.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/view_type_utils.h"
#include "chrome/common/automation_id.h"
#include "chrome/common/automation_messages.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
-#include "chrome/common/chrome_view_type.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_action.h"
#include "chrome/common/extensions/url_pattern.h"
@@ -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