| Index: content/browser/renderer_host/render_widget_host_view_aura.cc
|
| diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| index b821a9f8d7ddfbcb9963e21ffa724b51f7a5ba47..09803ee7f6e391d1be2041adf1be53492ecae289 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| @@ -2373,8 +2373,28 @@ void RenderWidgetHostViewAura::InitSelectionController(
|
| ui::TouchSelectionControllerAuraClient* selection_controller_client) {
|
| DCHECK(!selection_controller_client_);
|
| selection_controller_client_.reset(selection_controller_client);
|
| + 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;
|
| selection_controller_.reset(
|
| - new ui::TouchSelectionControllerAura(selection_controller_client));
|
| + new ui::TouchSelectionControllerAura(selection_controller_client,
|
| + strategy));
|
| + const std::string decay_str = base::CommandLine::ForCurrentProcess()->
|
| + GetSwitchValueASCII(switches::kTouchTextSelectionHalfDecay);
|
| + const std::string threshold_str = base::CommandLine::ForCurrentProcess()->
|
| + GetSwitchValueASCII(switches::kTouchTextSelectionThreshold);
|
| + if (!decay_str.empty() && !threshold_str.empty()) {
|
| + int decay_ms = atoi(decay_str.c_str());
|
| + int threshold = atoi(threshold_str.c_str());
|
| + if (decay_ms && threshold)
|
| + selection_controller_->SetVelocityStrategyParameters(decay_ms, threshold);
|
| + }
|
| +
|
| }
|
|
|
| void RenderWidgetHostViewAura::SnapToPhysicalPixelBoundary() {
|
|
|