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

Unified Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 38913002: Turn on natural scrolling if we detect a touchscreen. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1599/src/
Patch Set: Created 7 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/chrome_browser_main_chromeos.cc
===================================================================
--- chrome/browser/chromeos/chrome_browser_main_chromeos.cc (revision 230511)
+++ chrome/browser/chromeos/chrome_browser_main_chromeos.cc (working copy)
@@ -109,6 +109,8 @@
#include "net/base/network_change_notifier.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_context_getter.h"
+#include "ui/base/events/event_utils.h"
+#include "ui/base/touch/touch_device.h"
// Exclude X11 dependents for ozone
#if defined(USE_X11)
@@ -683,6 +685,13 @@
// adjusting the oom priority.
g_browser_process->platform_part()->oom_priority_manager()->Start();
+ // Turn on natural scroll if we have a touch screen.
+ if (ui::IsTouchDevicePresent()) {
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ chromeos::switches::kNaturalScrollDefault);
+ ui::SetNaturalScroll(true);
+ }
+
ChromeBrowserMainPartsLinux::PreBrowserStart();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698