Index: content/browser/renderer_host/render_widget_host_view_android.cc |
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc |
index 62538c8bb0e2639cd8ebc03dafb0957516e95255..c26ab8f2b46465e43743869c8d82ebd0a6245a1d 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_android.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc |
@@ -265,11 +265,20 @@ scoped_ptr<ui::TouchSelectionController> CreateSelectionController( |
DCHECK(content_view_core); |
int tap_timeout_ms = gfx::ViewConfiguration::GetTapTimeoutInMs(); |
int touch_slop_pixels = gfx::ViewConfiguration::GetTouchSlopInPixels(); |
+ ui::TextSelectionGranularityStrategy strategy = |
+ ui::GRANULARITY_STRATEGY_DEFAULT; |
+ const std::string strategy_str = base::CommandLine::ForCurrentProcess()-> |
+ GetSwitchValueASCII(switches::kTouchTextSelectionStrategy); |
+ if (strategy_str == "1") |
+ strategy = ui::GRANULARITY_STRATEGY_DIRECTION; |
+ else if (strategy_str == "2") |
+ strategy = ui::GRANULARITY_STRATEGY_VELOCITY; |
return make_scoped_ptr(new ui::TouchSelectionController( |
client, |
base::TimeDelta::FromMilliseconds(tap_timeout_ms), |
touch_slop_pixels / content_view_core->GetDpiScale(), |
- false)); |
+ false, |
+ strategy)); |
} |
scoped_ptr<OverscrollControllerAndroid> CreateOverscrollController( |