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

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

Issue 7787012: extensions: Disable all kinds of acceleration for background pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/background_contents.cc
diff --git a/chrome/browser/tab_contents/background_contents.cc b/chrome/browser/tab_contents/background_contents.cc
index 0c78a804839be545f95c328bcd3b00bc3b1ce79e..641183347046402a19578d2466eb9f66f2a7a1db 100644
--- a/chrome/browser/tab_contents/background_contents.cc
+++ b/chrome/browser/tab_contents/background_contents.cc
@@ -188,8 +188,18 @@ WebPreferences BackgroundContents::GetWebkitPrefs() {
// apps.
Profile* profile = Profile::FromBrowserContext(
render_view_host_->process()->browser_context());
- return RenderViewHostDelegateHelper::GetWebkitPrefs(profile,
- false); // is_web_ui
+ WebPreferences prefs = RenderViewHostDelegateHelper::GetWebkitPrefs(profile,
+ false);
+ // Disable all kinds of acceleration for background pages.
+ // See http://crbug.com/96005 and http://crbug.com/96006
+ prefs.force_compositing_mode = false;
+ prefs.accelerated_compositing_enabled = false;
+ prefs.accelerated_2d_canvas_enabled = false;
+ prefs.accelerated_video_enabled = false;
+ prefs.accelerated_drawing_enabled = false;
+ prefs.accelerated_plugins_enabled = false;
+
+ return prefs;
}
void BackgroundContents::CreateNewWindow(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698