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

Unified Diff: chrome/browser/tab_contents/render_view_host_delegate_helper.cc

Issue 8469015: Switch BackgroundContents to use TabContents instead of RenderViewHost. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix unittest Created 9 years, 1 month 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
« no previous file with comments | « chrome/browser/tab_contents/background_contents.cc ('k') | chrome/browser/tabs/tab_finder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/render_view_host_delegate_helper.cc
===================================================================
--- chrome/browser/tab_contents/render_view_host_delegate_helper.cc (revision 109469)
+++ chrome/browser/tab_contents/render_view_host_delegate_helper.cc (working copy)
@@ -152,7 +152,8 @@
opener->GetURL(),
frame_name);
if (contents) {
- pending_contents_[route_id] = contents->render_view_host();
+ pending_contents_[route_id] =
+ contents->tab_contents()->render_view_host();
return NULL;
}
}
@@ -551,8 +552,19 @@
extension_webkit_preferences::SetPreferences(&web_prefs, extension);
}
- if (rvh->delegate()->GetRenderViewType() == chrome::VIEW_TYPE_NOTIFICATION)
+ if (rvh->delegate()->GetRenderViewType() == chrome::VIEW_TYPE_NOTIFICATION) {
web_prefs.allow_scripts_to_close_windows = true;
+ } else if (rvh->delegate()->GetRenderViewType() ==
+ 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;
+ web_prefs.accelerated_compositing_enabled = false;
+ web_prefs.accelerated_2d_canvas_enabled = false;
+ web_prefs.accelerated_video_enabled = false;
+ web_prefs.accelerated_drawing_enabled = false;
+ web_prefs.accelerated_plugins_enabled = false;
+ }
return web_prefs;
}
« no previous file with comments | « chrome/browser/tab_contents/background_contents.cc ('k') | chrome/browser/tabs/tab_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698