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

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

Issue 10824168: Cleaning up compositing field trial code and enable FCM in beta/stable (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: compositor_utils.cc moved to content\common Created 8 years, 4 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
« no previous file with comments | « chrome/browser/chrome_browser_field_trials.cc ('k') | chrome/browser/gpu_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 19 matching lines...) Expand all
30 #include "chrome/browser/extensions/extension_host.h" 30 #include "chrome/browser/extensions/extension_host.h"
31 #include "chrome/browser/extensions/extension_info_map.h" 31 #include "chrome/browser/extensions/extension_info_map.h"
32 #include "chrome/browser/extensions/extension_process_manager.h" 32 #include "chrome/browser/extensions/extension_process_manager.h"
33 #include "chrome/browser/extensions/extension_service.h" 33 #include "chrome/browser/extensions/extension_service.h"
34 #include "chrome/browser/extensions/extension_system.h" 34 #include "chrome/browser/extensions/extension_system.h"
35 #include "chrome/browser/extensions/extension_web_ui.h" 35 #include "chrome/browser/extensions/extension_web_ui.h"
36 #include "chrome/browser/extensions/extension_webkit_preferences.h" 36 #include "chrome/browser/extensions/extension_webkit_preferences.h"
37 #include "chrome/browser/extensions/message_handler.h" 37 #include "chrome/browser/extensions/message_handler.h"
38 #include "chrome/browser/geolocation/chrome_access_token_store.h" 38 #include "chrome/browser/geolocation/chrome_access_token_store.h"
39 #include "chrome/browser/google/google_util.h" 39 #include "chrome/browser/google/google_util.h"
40 #include "chrome/browser/gpu_util.h"
41 #include "chrome/browser/infobars/infobar_tab_helper.h" 40 #include "chrome/browser/infobars/infobar_tab_helper.h"
42 #include "chrome/browser/media/media_internals.h" 41 #include "chrome/browser/media/media_internals.h"
43 #include "chrome/browser/net/chrome_net_log.h" 42 #include "chrome/browser/net/chrome_net_log.h"
44 #include "chrome/browser/notifications/desktop_notification_service.h" 43 #include "chrome/browser/notifications/desktop_notification_service.h"
45 #include "chrome/browser/notifications/desktop_notification_service_factory.h" 44 #include "chrome/browser/notifications/desktop_notification_service_factory.h"
46 #include "chrome/browser/pepper_gtalk_message_filter.h" 45 #include "chrome/browser/pepper_gtalk_message_filter.h"
47 #include "chrome/browser/platform_util.h" 46 #include "chrome/browser/platform_util.h"
48 #include "chrome/browser/prefs/pref_service.h" 47 #include "chrome/browser/prefs/pref_service.h"
49 #include "chrome/browser/prefs/scoped_user_pref_update.h" 48 #include "chrome/browser/prefs/scoped_user_pref_update.h"
50 #include "chrome/browser/prerender/prerender_manager.h" 49 #include "chrome/browser/prerender/prerender_manager.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 #include "content/public/browser/browser_main_parts.h" 85 #include "content/public/browser/browser_main_parts.h"
87 #include "content/public/browser/browser_url_handler.h" 86 #include "content/public/browser/browser_url_handler.h"
88 #include "content/public/browser/child_process_security_policy.h" 87 #include "content/public/browser/child_process_security_policy.h"
89 #include "content/public/browser/render_process_host.h" 88 #include "content/public/browser/render_process_host.h"
90 #include "content/public/browser/render_view_host.h" 89 #include "content/public/browser/render_view_host.h"
91 #include "content/public/browser/resource_context.h" 90 #include "content/public/browser/resource_context.h"
92 #include "content/public/browser/site_instance.h" 91 #include "content/public/browser/site_instance.h"
93 #include "content/public/browser/web_contents.h" 92 #include "content/public/browser/web_contents.h"
94 #include "content/public/browser/web_contents_view.h" 93 #include "content/public/browser/web_contents_view.h"
95 #include "content/public/common/child_process_host.h" 94 #include "content/public/common/child_process_host.h"
95 #include "content/public/common/compositor_util.h"
96 #include "content/public/common/content_descriptors.h" 96 #include "content/public/common/content_descriptors.h"
97 #include "grit/generated_resources.h" 97 #include "grit/generated_resources.h"
98 #include "grit/ui_resources.h" 98 #include "grit/ui_resources.h"
99 #include "net/base/ssl_cert_request_info.h" 99 #include "net/base/ssl_cert_request_info.h"
100 #include "net/cookies/canonical_cookie.h" 100 #include "net/cookies/canonical_cookie.h"
101 #include "net/cookies/cookie_options.h" 101 #include "net/cookies/cookie_options.h"
102 #include "ui/base/l10n/l10n_util.h" 102 #include "ui/base/l10n/l10n_util.h"
103 #include "ui/base/resource/resource_bundle.h" 103 #include "ui/base/resource/resource_bundle.h"
104 #include "webkit/glue/webpreferences.h" 104 #include "webkit/glue/webpreferences.h"
105 #include "webkit/plugins/plugin_switches.h" 105 #include "webkit/plugins/plugin_switches.h"
(...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 WebContents* web_contents = WebContents::FromRenderViewHost(rvh); 1486 WebContents* web_contents = WebContents::FromRenderViewHost(rvh);
1487 chrome::ViewType view_type = chrome::GetViewType(web_contents); 1487 chrome::ViewType view_type = chrome::GetViewType(web_contents);
1488 ExtensionService* service = profile->GetExtensionService(); 1488 ExtensionService* service = profile->GetExtensionService();
1489 if (service) { 1489 if (service) {
1490 const Extension* extension = service->extensions()->GetByID( 1490 const Extension* extension = service->extensions()->GetByID(
1491 rvh->GetSiteInstance()->GetSite().host()); 1491 rvh->GetSiteInstance()->GetSite().host());
1492 extension_webkit_preferences::SetPreferences( 1492 extension_webkit_preferences::SetPreferences(
1493 extension, view_type, web_prefs); 1493 extension, view_type, web_prefs);
1494 } 1494 }
1495 1495
1496 if (gpu_util::InForceCompositingModeOrThreadTrial()) 1496 if (content::IsForceCompositingModeEnabled())
1497 web_prefs->force_compositing_mode = true; 1497 web_prefs->force_compositing_mode = true;
1498 1498
1499 if (view_type == chrome::VIEW_TYPE_NOTIFICATION) { 1499 if (view_type == chrome::VIEW_TYPE_NOTIFICATION) {
1500 web_prefs->allow_scripts_to_close_windows = true; 1500 web_prefs->allow_scripts_to_close_windows = true;
1501 } else if (view_type == chrome::VIEW_TYPE_BACKGROUND_CONTENTS) { 1501 } else if (view_type == chrome::VIEW_TYPE_BACKGROUND_CONTENTS) {
1502 // Disable all kinds of acceleration for background pages. 1502 // Disable all kinds of acceleration for background pages.
1503 // See http://crbug.com/96005 and http://crbug.com/96006 1503 // See http://crbug.com/96005 and http://crbug.com/96006
1504 web_prefs->force_compositing_mode = false; 1504 web_prefs->force_compositing_mode = false;
1505 web_prefs->accelerated_compositing_enabled = false; 1505 web_prefs->accelerated_compositing_enabled = false;
1506 web_prefs->accelerated_2d_canvas_enabled = false; 1506 web_prefs->accelerated_2d_canvas_enabled = false;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 io_thread_application_locale_ = locale; 1681 io_thread_application_locale_ = locale;
1682 } 1682 }
1683 1683
1684 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( 1684 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread(
1685 const std::string& locale) { 1685 const std::string& locale) {
1686 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 1686 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
1687 io_thread_application_locale_ = locale; 1687 io_thread_application_locale_ = locale;
1688 } 1688 }
1689 1689
1690 } // namespace chrome 1690 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_field_trials.cc ('k') | chrome/browser/gpu_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698