Index: content/browser/renderer_host/input/touch_selection_controller.cc |
diff --git a/content/browser/renderer_host/input/touch_selection_controller.cc b/content/browser/renderer_host/input/touch_selection_controller.cc |
index 4c8807d0fccb149a08ab403fd83e3863cc8b521f..5aef2ee6058f851fe08cf06669d4c50c5528b5f8 100644 |
--- a/content/browser/renderer_host/input/touch_selection_controller.cc |
+++ b/content/browser/renderer_host/input/touch_selection_controller.cc |
@@ -6,7 +6,6 @@ |
#include "base/auto_reset.h" |
#include "base/logging.h" |
-#include "third_party/WebKit/public/web/WebInputEvent.h" |
namespace content { |
namespace { |
@@ -46,7 +45,7 @@ TouchSelectionController::TouchSelectionController( |
selection_editable_(false), |
temporarily_hidden_(false) { |
DCHECK(client_); |
- HideAndDisallowShowingAutomatically(); |
+ HideAndDisallowShowingAutomatically(); // XXX: needed? |
} |
TouchSelectionController::~TouchSelectionController() { |
@@ -203,6 +202,15 @@ bool TouchSelectionController::Animate(base::TimeTicks frame_time) { |
return false; |
} |
+void TouchSelectionController::ActivateSelection( |
+ const cc::ViewportSelectionBound& start, |
+ const cc::ViewportSelectionBound& end) { |
+ if (start.edge_bottom != end.edge_bottom) { |
+ ShowSelectionHandlesAutomatically(); |
+ OnSelectionBoundsChanged(start, end); |
+ } |
+} |
+ |
void TouchSelectionController::OnHandleDragBegin(const TouchHandle& handle) { |
if (&handle == insertion_handle_.get()) { |
client_->OnSelectionEvent(INSERTION_DRAG_STARTED, handle.position()); |
@@ -306,7 +314,7 @@ void TouchSelectionController::OnInsertionChanged() { |
void TouchSelectionController::OnSelectionChanged() { |
DeactivateInsertion(); |
- if (!activate_selection_automatically_) |
+ if (!activate_selection_automatically_) // XXX: needed? |
return; |
const bool was_active = is_selection_active_; |