diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-21 03:27:24 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-21 03:27:24 +0000 |
commit | 1515493f97d3ccddaeeac3b13b0064125fe9e42e (patch) | |
tree | 96f9ed626d9794b258b477f2aa2dc6dcc7742328 | |
parent | cc1d34d5ce2621038c6f9ad359c1d68411618792 (diff) | |
download | chromium_src-1515493f97d3ccddaeeac3b13b0064125fe9e42e.zip chromium_src-1515493f97d3ccddaeeac3b13b0064125fe9e42e.tar.gz chromium_src-1515493f97d3ccddaeeac3b13b0064125fe9e42e.tar.bz2 |
Correctly use IsThreadedCompositingEnabled in content_browsertests
Content-level defaults should be set direclty inside of content, not in chrome.
Also remove redundant setting of WebPreferences::force_compositing_mode in
ChromeContentBrowserClient - it's already set in
WebContentsImpl::GetWebkitPrefs.
This allows us to remove compositor_util.h from the public API.
BUG=276561
Review URL: https://chromiumcodereview.appspot.com/22912014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218619 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/chrome_content_browser_client.cc | 7 | ||||
-rw-r--r-- | content/browser/browser_main_loop.cc | 2 | ||||
-rw-r--r-- | content/browser/gpu/compositor_util.cc | 2 | ||||
-rw-r--r-- | content/browser/gpu/compositor_util.h (renamed from content/public/browser/compositor_util.h) | 8 | ||||
-rw-r--r-- | content/browser/gpu/gpu_internals_ui.cc | 2 | ||||
-rw-r--r-- | content/browser/renderer_host/render_process_host_impl.cc | 4 | ||||
-rw-r--r-- | content/browser/renderer_host/render_widget_host_impl.cc | 2 | ||||
-rw-r--r-- | content/browser/renderer_host/render_widget_host_view_browsertest.cc | 2 | ||||
-rw-r--r-- | content/browser/web_contents/web_contents_impl.cc | 2 | ||||
-rw-r--r-- | content/content_browser.gypi | 2 |
10 files changed, 15 insertions, 18 deletions
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 97d2761..e944f12 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -115,7 +115,6 @@ #include "content/public/browser/browser_url_handler.h" #include "content/public/browser/child_process_data.h" #include "content/public/browser/child_process_security_policy.h" -#include "content/public/browser/compositor_util.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/resource_context.h" @@ -1406,9 +1405,6 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( #endif } - if (content::IsThreadedCompositingEnabled()) - command_line->AppendSwitch(switches::kEnableThreadedCompositing); - if (message_center::IsRichNotificationEnabled()) command_line->AppendSwitch(switches::kDisableHTMLNotifications); @@ -2207,9 +2203,6 @@ void ChromeContentBrowserClient::OverrideWebkitPrefs( } DCHECK(!web_prefs->default_encoding.empty()); - if (content::IsForceCompositingModeEnabled()) - web_prefs->force_compositing_mode = true; - WebContents* web_contents = WebContents::FromRenderViewHost(rvh); extensions::ViewType view_type = extensions::GetViewType(web_contents); ExtensionService* service = diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc index 8bde5f2..82a312e8 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc @@ -27,6 +27,7 @@ #include "content/browser/download/save_file_manager.h" #include "content/browser/gamepad/gamepad_service.h" #include "content/browser/gpu/browser_gpu_channel_host_factory.h" +#include "content/browser/gpu/compositor_util.h" #include "content/browser/gpu/gpu_data_manager_impl.h" #include "content/browser/gpu/gpu_process_host.h" #include "content/browser/gpu/gpu_process_host_ui_shim.h" @@ -43,7 +44,6 @@ #include "content/browser/webui/url_data_manager.h" #include "content/public/browser/browser_main_parts.h" #include "content/public/browser/browser_shutdown.h" -#include "content/public/browser/compositor_util.h" #include "content/public/browser/content_browser_client.h" #include "content/public/browser/render_process_host.h" #include "content/public/common/content_switches.h" diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc index a0cf1e2..77dda3f 100644 --- a/content/browser/gpu/compositor_util.cc +++ b/content/browser/gpu/compositor_util.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/public/browser/compositor_util.h" +#include "content/browser/gpu/compositor_util.h" #include "base/command_line.h" #include "base/metrics/field_trial.h" diff --git a/content/public/browser/compositor_util.h b/content/browser/gpu/compositor_util.h index a237d07..06b8f1d 100644 --- a/content/public/browser/compositor_util.h +++ b/content/browser/gpu/compositor_util.h @@ -1,9 +1,9 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_PUBLIC_BROWSER_COMPOSITOR_UTIL_H_ -#define CONTENT_PUBLIC_BROWSER_COMPOSITOR_UTIL_H_ +#ifndef CONTENT_BROWSER_GPU_COMPOSITOR_UTIL_H_ +#define CONTENT_BROWSER_GPU_COMPOSITOR_UTIL_H_ #include "content/common/content_export.h" @@ -17,4 +17,4 @@ CONTENT_EXPORT bool IsForceCompositingModeEnabled(); } // namespace content -#endif // CONTENT_PUBLIC_BROWSER_COMPOSITOR_UTIL_H_ +#endif // CONTENT_BROWSER_GPU_COMPOSITOR_UTIL_H_ diff --git a/content/browser/gpu/gpu_internals_ui.cc b/content/browser/gpu/gpu_internals_ui.cc index 0e778c2..0340077 100644 --- a/content/browser/gpu/gpu_internals_ui.cc +++ b/content/browser/gpu/gpu_internals_ui.cc @@ -15,9 +15,9 @@ #include "base/sys_info.h" #include "base/values.h" #include "cc/base/switches.h" +#include "content/browser/gpu/compositor_util.h" #include "content/browser/gpu/gpu_data_manager_impl.h" #include "content/public/browser/browser_thread.h" -#include "content/public/browser/compositor_util.h" #include "content/public/browser/gpu_data_manager_observer.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index 25e5a05..39b3eda 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -52,6 +52,7 @@ #include "content/browser/fileapi/chrome_blob_storage_context.h" #include "content/browser/fileapi/fileapi_message_filter.h" #include "content/browser/geolocation/geolocation_dispatcher_host.h" +#include "content/browser/gpu/compositor_util.h" #include "content/browser/gpu/gpu_data_manager_impl.h" #include "content/browser/gpu/gpu_process_host.h" #include "content/browser/gpu/shader_disk_cache.h" @@ -817,6 +818,9 @@ void RenderProcessHostImpl::AppendRendererCommandLine( field_trial_states); } + if (content::IsThreadedCompositingEnabled()) + command_line->AppendSwitch(switches::kEnableThreadedCompositing); + GetContentClient()->browser()->AppendExtraCommandLineSwitches( command_line, GetID()); diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc index 3bc85909..d7a0209 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -22,6 +22,7 @@ #include "cc/output/compositor_frame.h" #include "cc/output/compositor_frame_ack.h" #include "content/browser/accessibility/browser_accessibility_state_impl.h" +#include "content/browser/gpu/compositor_util.h" #include "content/browser/gpu/gpu_process_host.h" #include "content/browser/gpu/gpu_process_host_ui_shim.h" #include "content/browser/gpu/gpu_surface_tracker.h" @@ -40,7 +41,6 @@ #include "content/common/input_messages.h" #include "content/common/view_messages.h" #include "content/port/browser/render_widget_host_view_port.h" -#include "content/public/browser/compositor_util.h" #include "content/public/browser/native_web_keyboard_event.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/notification_types.h" diff --git a/content/browser/renderer_host/render_widget_host_view_browsertest.cc b/content/browser/renderer_host/render_widget_host_view_browsertest.cc index 3675ece..94d0db5 100644 --- a/content/browser/renderer_host/render_widget_host_view_browsertest.cc +++ b/content/browser/renderer_host/render_widget_host_view_browsertest.cc @@ -6,12 +6,12 @@ #include "base/message_loop/message_loop_proxy.h" #include "base/path_service.h" #include "base/run_loop.h" +#include "content/browser/gpu/compositor_util.h" #include "content/browser/gpu/gpu_data_manager_impl.h" #include "content/browser/renderer_host/dip_util.h" #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/port/browser/render_widget_host_view_frame_subscriber.h" #include "content/port/browser/render_widget_host_view_port.h" -#include "content/public/browser/compositor_util.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" #include "content/public/common/content_paths.h" diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index baf3d5e..3bc66e6 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -29,6 +29,7 @@ #include "content/browser/download/download_stats.h" #include "content/browser/download/mhtml_generation_manager.h" #include "content/browser/download/save_package.h" +#include "content/browser/gpu/compositor_util.h" #include "content/browser/gpu/gpu_data_manager_impl.h" #include "content/browser/gpu/gpu_process_host.h" #include "content/browser/host_zoom_map_impl.h" @@ -53,7 +54,6 @@ #include "content/port/browser/render_widget_host_view_port.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/color_chooser.h" -#include "content/public/browser/compositor_util.h" #include "content/public/browser/content_browser_client.h" #include "content/public/browser/devtools_agent_host.h" #include "content/public/browser/download_manager.h" diff --git a/content/content_browser.gypi b/content/content_browser.gypi index 285d685..b1fbb95 100644 --- a/content/content_browser.gypi +++ b/content/content_browser.gypi @@ -64,7 +64,6 @@ 'public/browser/child_process_data.h', 'public/browser/child_process_security_policy.h', 'public/browser/color_chooser.h', - 'public/browser/compositor_util.h', 'public/browser/certificate_request_result_type.h', 'public/browser/content_browser_client.cc', 'public/browser/content_browser_client.h', @@ -570,6 +569,7 @@ 'browser/gpu/browser_gpu_channel_host_factory.cc', 'browser/gpu/browser_gpu_channel_host_factory.h', 'browser/gpu/compositor_util.cc', + 'browser/gpu/compositor_util.h', 'browser/gpu/gpu_data_manager_impl.cc', 'browser/gpu/gpu_data_manager_impl.h', 'browser/gpu/gpu_data_manager_impl_private.cc', |