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

Unified Diff: chrome/browser/tab_contents/render_view_host_delegate_helper.cc

Issue 7693019: Enable smooth scrolling on mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/common.gypi ('k') | chrome/test/ui/ppapi_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/render_view_host_delegate_helper.cc
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
index 4958bc89a5d8c970bcea7bd231ffac15654843e8..d82f08bee98a2301c2d83f0b7c932f5a15d60fe4 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -460,8 +460,18 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
prefs->GetBoolean(prefs::kWebKitAllowDisplayingInsecureContent);
web_prefs.allow_running_insecure_content =
prefs->GetBoolean(prefs::kWebKitAllowRunningInsecureContent);
- web_prefs.enable_scroll_animator =
- command_line.HasSwitch(switches::kEnableSmoothScrolling);
+
+#if defined(OS_MACOSX)
+ bool default_enable_scroll_animator = true;
+#else
+ // On CrOS, the launcher always passes in the --enable flag.
+ bool default_enable_scroll_animator = false;
+#endif
+ web_prefs.enable_scroll_animator = default_enable_scroll_animator;
+ if (command_line.HasSwitch(switches::kEnableSmoothScrolling))
+ web_prefs.enable_scroll_animator = true;
+ if (command_line.HasSwitch(switches::kDisableSmoothScrolling))
+ web_prefs.enable_scroll_animator = false;
// The user stylesheet watcher may not exist in a testing profile.
if (profile->GetUserStyleSheetWatcher()) {
« no previous file with comments | « build/common.gypi ('k') | chrome/test/ui/ppapi_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698