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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 9583022: Don't suppress HW compositing on the new file manager (chrome://files). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 10 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 | « chrome/browser/chrome_content_browser_client.h ('k') | content/browser/mock_content_browser_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 1e1d02e0ab65b202ce90c5b6ba9107d7febcd8ac..c6e47f3f7f9d97974f5ed8704c2c2d4750dd8cab 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1262,7 +1262,7 @@ bool ChromeContentBrowserClient::IsFastShutdownPossible() {
}
void ChromeContentBrowserClient::OverrideWebkitPrefs(
- RenderViewHost* rvh, WebPreferences* web_prefs) {
+ RenderViewHost* rvh, const GURL& url, WebPreferences* web_prefs) {
Profile* profile = Profile::FromBrowserContext(
rvh->process()->GetBrowserContext());
PrefService* prefs = profile->GetPrefs();
@@ -1402,6 +1402,16 @@ void ChromeContentBrowserClient::OverrideWebkitPrefs(
web_prefs->accelerated_painting_enabled = false;
web_prefs->accelerated_plugins_enabled = false;
}
+
+#if defined(FILE_MANAGER_EXTENSION)
+ // Override the default of suppressing HW compositing for WebUI pages for the
+ // file manager, which is implemented using WebUI but wants HW acceleration
+ // for video decode & render.
+ if (url.spec() == chrome::kChromeUIFileManagerURL) {
+ web_prefs->accelerated_compositing_enabled = true;
+ web_prefs->accelerated_2d_canvas_enabled = true;
+ }
+#endif
}
void ChromeContentBrowserClient::UpdateInspectorSetting(
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | content/browser/mock_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698