summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjdduke <jdduke@chromium.org>2015-06-10 13:10:34 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-10 20:11:05 +0000
commitcd8d956ab372ece695ca4aaa48bcf5dd4699b3ba (patch)
treea88800ad5c7af1b3e9e0856ea3f6c6e0156862ee
parent1f54336fed5113fc440658d2a8465ae7a4d9a02c (diff)
downloadchromium_src-cd8d956ab372ece695ca4aaa48bcf5dd4699b3ba.zip
chromium_src-cd8d956ab372ece695ca4aaa48bcf5dd4699b3ba.tar.gz
chromium_src-cd8d956ab372ece695ca4aaa48bcf5dd4699b3ba.tar.bz2
[Android] Conditionally enable M text selection features
Enable longpress drag selection and smart selection by default on Android platforms more recent than L, for both Chrome and WebView. BUG=466749,451255 Review URL: https://codereview.chromium.org/1175703002 Cr-Commit-Position: refs/heads/master@{#333781}
-rw-r--r--content/browser/android/content_startup_flags.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/content/browser/android/content_startup_flags.cc b/content/browser/android/content_startup_flags.cc
index 6ebe4e1..ebd585b 100644
--- a/content/browser/android/content_startup_flags.cc
+++ b/content/browser/android/content_startup_flags.cc
@@ -63,6 +63,14 @@ void SetContentCommandLineFlags(bool single_process,
parsed_command_line->AppendSwitch(switches::kEnableOverlayScrollbar);
parsed_command_line->AppendSwitch(switches::kValidateInputEventStream);
+ // TODO(jdduke): Use the proper SDK version when available, crbug.com/466749.
+ if (base::android::BuildInfo::GetInstance()->sdk_int() >
+ base::android::SDK_VERSION_LOLLIPOP_MR1) {
+ parsed_command_line->AppendSwitch(switches::kEnableLongpressDragSelection);
+ parsed_command_line->AppendSwitchASCII(
+ switches::kTouchTextSelectionStrategy, "direction");
+ }
+
// There is no software fallback on Android, so don't limit GPU crashes.
parsed_command_line->AppendSwitch(switches::kDisableGpuProcessCrashLimit);