| Index: ui/views/touchui/touch_selection_controller_impl.cc
|
| diff --git a/ui/views/touchui/touch_selection_controller_impl.cc b/ui/views/touchui/touch_selection_controller_impl.cc
|
| index 316fe3bc5f3969007763fe42b2d3895fae15d709..ad53709a78e04330f29b5469cd1adefe12d2b0ed 100644
|
| --- a/ui/views/touchui/touch_selection_controller_impl.cc
|
| +++ b/ui/views/touchui/touch_selection_controller_impl.cc
|
| @@ -58,6 +58,7 @@ const int kSelectionHandleHorizPadding = 10;
|
| const int kSelectionHandleVertPadding = 20;
|
|
|
| const int kContextMenuTimoutMs = 200;
|
| +bool g_open_quick_menu_immediately_for_test = false;
|
|
|
| const int kSelectionHandleQuickFadeDurationMs = 50;
|
|
|
| @@ -342,6 +343,12 @@ TouchSelectionControllerImpl::~TouchSelectionControllerImpl() {
|
| client_widget_->RemoveObserver(this);
|
| }
|
|
|
| +// static
|
| +void TouchSelectionControllerImpl::SetOpenQuickMenuImmediatelyForTest(
|
| + bool immediate) {
|
| + g_open_quick_menu_immediately_for_test = immediate;
|
| +}
|
| +
|
| void TouchSelectionControllerImpl::SelectionChanged() {
|
| gfx::Rect r1, r2;
|
| client_view_->GetSelectionEndPoints(&r1, &r2);
|
| @@ -580,6 +587,10 @@ void TouchSelectionControllerImpl::ContextMenuTimerFired() {
|
| void TouchSelectionControllerImpl::StartContextMenuTimer() {
|
| if (context_menu_timer_.IsRunning())
|
| return;
|
| + if (g_open_quick_menu_immediately_for_test) {
|
| + ContextMenuTimerFired();
|
| + return;
|
| + }
|
| context_menu_timer_.Start(
|
| FROM_HERE,
|
| base::TimeDelta::FromMilliseconds(kContextMenuTimoutMs),
|
|
|