| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/renderer_host/input/touch_selection_controller_client_
aura.h" | 5 #include "content/browser/renderer_host/input/touch_selection_controller_client_
aura.h" |
| 6 | 6 |
| 7 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 7 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
| 8 #include "content/browser/renderer_host/render_widget_host_impl.h" | 8 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 9 #include "content/browser/renderer_host/render_widget_host_view_aura.h" | 9 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 touch_down_ = true; | 135 touch_down_ = true; |
| 136 UpdateQuickMenu(); | 136 UpdateQuickMenu(); |
| 137 } | 137 } |
| 138 | 138 |
| 139 void TouchSelectionControllerClientAura::OnTouchUp() { | 139 void TouchSelectionControllerClientAura::OnTouchUp() { |
| 140 touch_down_ = false; | 140 touch_down_ = false; |
| 141 UpdateQuickMenu(); | 141 UpdateQuickMenu(); |
| 142 } | 142 } |
| 143 | 143 |
| 144 void TouchSelectionControllerClientAura::OnScrollStarted() { | 144 void TouchSelectionControllerClientAura::OnScrollStarted() { |
| 145 rwhva_->selection_controller()->OnScrollBeginEvent(); |
| 145 scroll_in_progress_ = true; | 146 scroll_in_progress_ = true; |
| 146 rwhva_->selection_controller()->SetTemporarilyHidden(true); | 147 rwhva_->selection_controller()->SetTemporarilyHidden(true); |
| 147 UpdateQuickMenu(); | 148 UpdateQuickMenu(); |
| 148 } | 149 } |
| 149 | 150 |
| 150 void TouchSelectionControllerClientAura::OnScrollCompleted() { | 151 void TouchSelectionControllerClientAura::OnScrollCompleted() { |
| 151 scroll_in_progress_ = false; | 152 scroll_in_progress_ = false; |
| 152 rwhva_->selection_controller()->SetTemporarilyHidden(false); | 153 rwhva_->selection_controller()->SetTemporarilyHidden(false); |
| 153 UpdateQuickMenu(); | 154 UpdateQuickMenu(); |
| 154 } | 155 } |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 ui::MENU_SOURCE_TOUCH_EDIT_MENU, | 367 ui::MENU_SOURCE_TOUCH_EDIT_MENU, |
| 367 gfx::ToRoundedPoint(anchor_point))); | 368 gfx::ToRoundedPoint(anchor_point))); |
| 368 | 369 |
| 369 // Hide selection handles after getting rect-between-bounds from touch | 370 // Hide selection handles after getting rect-between-bounds from touch |
| 370 // selection controller; otherwise, rect would be empty and the above | 371 // selection controller; otherwise, rect would be empty and the above |
| 371 // calculations would be invalid. | 372 // calculations would be invalid. |
| 372 rwhva_->selection_controller()->HideAndDisallowShowingAutomatically(); | 373 rwhva_->selection_controller()->HideAndDisallowShowingAutomatically(); |
| 373 } | 374 } |
| 374 | 375 |
| 375 } // namespace content | 376 } // namespace content |
| OLD | NEW |