From cd8d956ab372ece695ca4aaa48bcf5dd4699b3ba Mon Sep 17 00:00:00 2001 From: jdduke Date: Wed, 10 Jun 2015 13:10:34 -0700 Subject: [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} --- content/browser/android/content_startup_flags.cc | 8 ++++++++ 1 file changed, 8 insertions(+) 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); -- cgit v1.1