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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 233093006: Stop disabling force_compositing_mode for background RenderViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: background: WebContentsDelegate Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 2345 matching lines...) Expand 10 before | Expand all | Expand 10 after
2356 // webview tags as well as hosts that happen to match the id of an 2356 // webview tags as well as hosts that happen to match the id of an
2357 // installed extension would get the wrong preferences. 2357 // installed extension would get the wrong preferences.
2358 if (site_url.SchemeIs(extensions::kExtensionScheme)) { 2358 if (site_url.SchemeIs(extensions::kExtensionScheme)) {
2359 extension_webkit_preferences::SetPreferences( 2359 extension_webkit_preferences::SetPreferences(
2360 extension, view_type, web_prefs); 2360 extension, view_type, web_prefs);
2361 } 2361 }
2362 } 2362 }
2363 2363
2364 if (view_type == extensions::VIEW_TYPE_NOTIFICATION) { 2364 if (view_type == extensions::VIEW_TYPE_NOTIFICATION) {
2365 web_prefs->allow_scripts_to_close_windows = true; 2365 web_prefs->allow_scripts_to_close_windows = true;
2366 } else if (view_type == extensions::VIEW_TYPE_BACKGROUND_CONTENTS) {
2367 // Disable all kinds of acceleration for background pages.
2368 // See http://crbug.com/96005 and http://crbug.com/96006
2369 web_prefs->force_compositing_mode = false;
2370 web_prefs->accelerated_compositing_enabled = false;
2371 } 2366 }
2372 2367
2373 #if defined(OS_CHROMEOS) 2368 #if defined(OS_CHROMEOS)
2374 // Override the default of suppressing HW compositing for WebUI pages for the 2369 // Override the default of suppressing HW compositing for WebUI pages for the
2375 // file manager, which is implemented using WebUI but wants HW acceleration 2370 // file manager, which is implemented using WebUI but wants HW acceleration
2376 // for video decode & render. 2371 // for video decode & render.
2377 if (url.SchemeIs(extensions::kExtensionScheme) && 2372 if (url.SchemeIs(extensions::kExtensionScheme) &&
2378 url.host() == file_manager::kFileManagerAppId) { 2373 url.host() == file_manager::kFileManagerAppId) {
2379 web_prefs->accelerated_compositing_enabled = true; 2374 web_prefs->accelerated_compositing_enabled = true;
2380 web_prefs->accelerated_2d_canvas_enabled = true; 2375 web_prefs->accelerated_2d_canvas_enabled = true;
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
2759 switches::kDisableWebRtcEncryption, 2754 switches::kDisableWebRtcEncryption,
2760 }; 2755 };
2761 to_command_line->CopySwitchesFrom(from_command_line, 2756 to_command_line->CopySwitchesFrom(from_command_line,
2762 kWebRtcDevSwitchNames, 2757 kWebRtcDevSwitchNames,
2763 arraysize(kWebRtcDevSwitchNames)); 2758 arraysize(kWebRtcDevSwitchNames));
2764 } 2759 }
2765 } 2760 }
2766 #endif // defined(ENABLE_WEBRTC) 2761 #endif // defined(ENABLE_WEBRTC)
2767 2762
2768 } // namespace chrome 2763 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698