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 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1646 if (content::IsForceCompositingModeEnabled()) | 1646 if (content::IsForceCompositingModeEnabled()) |
1647 web_prefs->force_compositing_mode = true; | 1647 web_prefs->force_compositing_mode = true; |
1648 | 1648 |
1649 if (view_type == chrome::VIEW_TYPE_NOTIFICATION) { | 1649 if (view_type == chrome::VIEW_TYPE_NOTIFICATION) { |
1650 web_prefs->allow_scripts_to_close_windows = true; | 1650 web_prefs->allow_scripts_to_close_windows = true; |
1651 } else if (view_type == chrome::VIEW_TYPE_BACKGROUND_CONTENTS) { | 1651 } else if (view_type == chrome::VIEW_TYPE_BACKGROUND_CONTENTS) { |
1652 // Disable all kinds of acceleration for background pages. | 1652 // Disable all kinds of acceleration for background pages. |
1653 // See http://crbug.com/96005 and http://crbug.com/96006 | 1653 // See http://crbug.com/96005 and http://crbug.com/96006 |
1654 web_prefs->force_compositing_mode = false; | 1654 web_prefs->force_compositing_mode = false; |
1655 web_prefs->accelerated_compositing_enabled = false; | 1655 web_prefs->accelerated_compositing_enabled = false; |
1656 web_prefs->accelerated_2d_canvas_enabled = false; | |
1657 web_prefs->accelerated_video_enabled = false; | |
1658 web_prefs->accelerated_painting_enabled = false; | |
1659 web_prefs->accelerated_plugins_enabled = false; | |
1660 } | 1656 } |
1661 | 1657 |
1662 #if defined(FILE_MANAGER_EXTENSION) | 1658 #if defined(FILE_MANAGER_EXTENSION) |
1663 // Override the default of suppressing HW compositing for WebUI pages for the | 1659 // Override the default of suppressing HW compositing for WebUI pages for the |
1664 // file manager, which is implemented using WebUI but wants HW acceleration | 1660 // file manager, which is implemented using WebUI but wants HW acceleration |
1665 // for video decode & render. | 1661 // for video decode & render. |
1666 if (url.spec() == chrome::kChromeUIFileManagerURL) { | 1662 if (url.spec() == chrome::kChromeUIFileManagerURL) { |
1667 web_prefs->accelerated_compositing_enabled = true; | 1663 web_prefs->accelerated_compositing_enabled = true; |
1668 web_prefs->accelerated_2d_canvas_enabled = true; | 1664 web_prefs->accelerated_2d_canvas_enabled = true; |
1669 } | 1665 } |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1912 io_thread_application_locale_ = locale; | 1908 io_thread_application_locale_ = locale; |
1913 } | 1909 } |
1914 | 1910 |
1915 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( | 1911 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( |
1916 const std::string& locale) { | 1912 const std::string& locale) { |
1917 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 1913 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
1918 io_thread_application_locale_ = locale; | 1914 io_thread_application_locale_ = locale; |
1919 } | 1915 } |
1920 | 1916 |
1921 } // namespace chrome | 1917 } // namespace chrome |
OLD | NEW |