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

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

Issue 10541019: Adding a field trial for testing --force-compositing-mode on 50% of (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1441 WebContents* web_contents = WebContents::FromRenderViewHost(rvh); 1441 WebContents* web_contents = WebContents::FromRenderViewHost(rvh);
1442 chrome::ViewType view_type = chrome::GetViewType(web_contents); 1442 chrome::ViewType view_type = chrome::GetViewType(web_contents);
1443 ExtensionService* service = profile->GetExtensionService(); 1443 ExtensionService* service = profile->GetExtensionService();
1444 if (service) { 1444 if (service) {
1445 const Extension* extension = service->extensions()->GetByID( 1445 const Extension* extension = service->extensions()->GetByID(
1446 rvh->GetSiteInstance()->GetSite().host()); 1446 rvh->GetSiteInstance()->GetSite().host());
1447 extension_webkit_preferences::SetPreferences( 1447 extension_webkit_preferences::SetPreferences(
1448 extension, view_type, web_prefs); 1448 extension, view_type, web_prefs);
1449 } 1449 }
1450 1450
1451 if (chrome_browser_trials::g_in_force_compositing_mode_trial)
1452 web_prefs->force_compositing_mode = true;
1453
1451 if (view_type == chrome::VIEW_TYPE_NOTIFICATION) { 1454 if (view_type == chrome::VIEW_TYPE_NOTIFICATION) {
1452 web_prefs->allow_scripts_to_close_windows = true; 1455 web_prefs->allow_scripts_to_close_windows = true;
1453 } else if (view_type == chrome::VIEW_TYPE_BACKGROUND_CONTENTS) { 1456 } else if (view_type == chrome::VIEW_TYPE_BACKGROUND_CONTENTS) {
1454 // Disable all kinds of acceleration for background pages. 1457 // Disable all kinds of acceleration for background pages.
1455 // See http://crbug.com/96005 and http://crbug.com/96006 1458 // See http://crbug.com/96005 and http://crbug.com/96006
1456 web_prefs->force_compositing_mode = false; 1459 web_prefs->force_compositing_mode = false;
1457 web_prefs->accelerated_compositing_enabled = false; 1460 web_prefs->accelerated_compositing_enabled = false;
1458 web_prefs->accelerated_2d_canvas_enabled = false; 1461 web_prefs->accelerated_2d_canvas_enabled = false;
1459 web_prefs->accelerated_video_enabled = false; 1462 web_prefs->accelerated_video_enabled = false;
1460 web_prefs->accelerated_painting_enabled = false; 1463 web_prefs->accelerated_painting_enabled = false;
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1619 #if defined(USE_NSS) 1622 #if defined(USE_NSS)
1620 crypto::CryptoModuleBlockingPasswordDelegate* 1623 crypto::CryptoModuleBlockingPasswordDelegate*
1621 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 1624 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
1622 const GURL& url) { 1625 const GURL& url) {
1623 return browser::NewCryptoModuleBlockingDialogDelegate( 1626 return browser::NewCryptoModuleBlockingDialogDelegate(
1624 browser::kCryptoModulePasswordKeygen, url.host()); 1627 browser::kCryptoModulePasswordKeygen, url.host());
1625 } 1628 }
1626 #endif 1629 #endif
1627 1630
1628 } // namespace chrome 1631 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698