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

Unified Diff: chrome/browser/chrome_content_browser_client.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/chrome_content_browser_client.cc
===================================================================
--- chrome/browser/chrome_content_browser_client.cc (revision 138369)
+++ chrome/browser/chrome_content_browser_client.cc (working copy)
@@ -1447,19 +1447,19 @@
}
DCHECK(!web_prefs->default_encoding.empty());
+ WebContents* web_contents = WebContents::FromRenderViewHost(rvh);
+ chrome::ViewType view_type = chrome::GetViewType(web_contents);
ExtensionService* service = profile->GetExtensionService();
if (service) {
const Extension* extension = service->extensions()->GetByID(
rvh->GetSiteInstance()->GetSite().host());
extension_webkit_preferences::SetPreferences(
- extension, rvh->GetDelegate()->GetRenderViewType(), web_prefs);
+ extension, view_type, web_prefs);
}
- if (rvh->GetDelegate()->GetRenderViewType() ==
- chrome::VIEW_TYPE_NOTIFICATION) {
+ if (view_type == chrome::VIEW_TYPE_NOTIFICATION) {
web_prefs->allow_scripts_to_close_windows = true;
- } else if (rvh->GetDelegate()->GetRenderViewType() ==
- chrome::VIEW_TYPE_BACKGROUND_CONTENTS) {
+ } else if (view_type == chrome::VIEW_TYPE_BACKGROUND_CONTENTS) {
// Disable all kinds of acceleration for background pages.
// See http://crbug.com/96005 and http://crbug.com/96006
web_prefs->force_compositing_mode = false;

Powered by Google App Engine
This is Rietveld 408576698