OLD | NEW |
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 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1471 WebContents* web_contents = WebContents::FromRenderViewHost(rvh); | 1471 WebContents* web_contents = WebContents::FromRenderViewHost(rvh); |
1472 chrome::ViewType view_type = chrome::GetViewType(web_contents); | 1472 chrome::ViewType view_type = chrome::GetViewType(web_contents); |
1473 ExtensionService* service = profile->GetExtensionService(); | 1473 ExtensionService* service = profile->GetExtensionService(); |
1474 if (service) { | 1474 if (service) { |
1475 const Extension* extension = service->extensions()->GetByID( | 1475 const Extension* extension = service->extensions()->GetByID( |
1476 rvh->GetSiteInstance()->GetSite().host()); | 1476 rvh->GetSiteInstance()->GetSite().host()); |
1477 extension_webkit_preferences::SetPreferences( | 1477 extension_webkit_preferences::SetPreferences( |
1478 extension, view_type, web_prefs); | 1478 extension, view_type, web_prefs); |
1479 } | 1479 } |
1480 | 1480 |
1481 if (gpu_util::InForceCompositingModeTrial()) | 1481 if (gpu_util::InForceCompositingModeOrThreadTrial()) |
1482 web_prefs->force_compositing_mode = true; | 1482 web_prefs->force_compositing_mode = true; |
1483 | 1483 |
1484 if (view_type == chrome::VIEW_TYPE_NOTIFICATION) { | 1484 if (view_type == chrome::VIEW_TYPE_NOTIFICATION) { |
1485 web_prefs->allow_scripts_to_close_windows = true; | 1485 web_prefs->allow_scripts_to_close_windows = true; |
1486 } else if (view_type == chrome::VIEW_TYPE_BACKGROUND_CONTENTS) { | 1486 } else if (view_type == chrome::VIEW_TYPE_BACKGROUND_CONTENTS) { |
1487 // Disable all kinds of acceleration for background pages. | 1487 // Disable all kinds of acceleration for background pages. |
1488 // See http://crbug.com/96005 and http://crbug.com/96006 | 1488 // See http://crbug.com/96005 and http://crbug.com/96006 |
1489 web_prefs->force_compositing_mode = false; | 1489 web_prefs->force_compositing_mode = false; |
1490 web_prefs->accelerated_compositing_enabled = false; | 1490 web_prefs->accelerated_compositing_enabled = false; |
1491 web_prefs->accelerated_2d_canvas_enabled = false; | 1491 web_prefs->accelerated_2d_canvas_enabled = false; |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1666 io_thread_application_locale_ = locale; | 1666 io_thread_application_locale_ = locale; |
1667 } | 1667 } |
1668 | 1668 |
1669 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( | 1669 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( |
1670 const std::string& locale) { | 1670 const std::string& locale) { |
1671 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 1671 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
1672 io_thread_application_locale_ = locale; | 1672 io_thread_application_locale_ = locale; |
1673 } | 1673 } |
1674 | 1674 |
1675 } // namespace chrome | 1675 } // namespace chrome |
OLD | NEW |