| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 2158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2169 #endif | 2169 #endif |
| 2170 | 2170 |
| 2171 target_host->ForwardKeyboardEvent(event); | 2171 target_host->ForwardKeyboardEvent(event); |
| 2172 } | 2172 } |
| 2173 | 2173 |
| 2174 void RenderWidgetHostViewAura::SelectionUpdated( | 2174 void RenderWidgetHostViewAura::SelectionUpdated( |
| 2175 bool is_editable, | 2175 bool is_editable, |
| 2176 bool is_empty_text_form_control, | 2176 bool is_empty_text_form_control, |
| 2177 const gfx::SelectionBound& start, | 2177 const gfx::SelectionBound& start, |
| 2178 const gfx::SelectionBound& end) { | 2178 const gfx::SelectionBound& end) { |
| 2179 selection_controller_->OnSelectionEditable(is_editable); | |
| 2180 selection_controller_->OnSelectionEmpty(is_empty_text_form_control); | |
| 2181 selection_controller_->OnSelectionBoundsChanged(start, end); | 2179 selection_controller_->OnSelectionBoundsChanged(start, end); |
| 2182 } | 2180 } |
| 2183 | 2181 |
| 2184 void RenderWidgetHostViewAura::CreateSelectionController() { | 2182 void RenderWidgetHostViewAura::CreateSelectionController() { |
| 2185 ui::TouchSelectionController::Config tsc_config; | 2183 ui::TouchSelectionController::Config tsc_config; |
| 2186 tsc_config.max_tap_duration = base::TimeDelta::FromMilliseconds( | 2184 tsc_config.max_tap_duration = base::TimeDelta::FromMilliseconds( |
| 2187 ui::GestureConfiguration::GetInstance()->long_press_time_in_ms()); | 2185 ui::GestureConfiguration::GetInstance()->long_press_time_in_ms()); |
| 2188 tsc_config.tap_slop = ui::GestureConfiguration::GetInstance() | 2186 tsc_config.tap_slop = ui::GestureConfiguration::GetInstance() |
| 2189 ->max_touch_move_in_pixels_for_click(); | 2187 ->max_touch_move_in_pixels_for_click(); |
| 2190 tsc_config.enable_longpress_drag_selection = false; | 2188 tsc_config.enable_longpress_drag_selection = false; |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2381 | 2379 |
| 2382 void RenderWidgetHostViewAura::SetPopupChild( | 2380 void RenderWidgetHostViewAura::SetPopupChild( |
| 2383 RenderWidgetHostViewAura* popup_child_host_view) { | 2381 RenderWidgetHostViewAura* popup_child_host_view) { |
| 2384 popup_child_host_view_ = popup_child_host_view; | 2382 popup_child_host_view_ = popup_child_host_view; |
| 2385 event_handler_->SetPopupChild( | 2383 event_handler_->SetPopupChild( |
| 2386 popup_child_host_view, | 2384 popup_child_host_view, |
| 2387 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); | 2385 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); |
| 2388 } | 2386 } |
| 2389 | 2387 |
| 2390 } // namespace content | 2388 } // namespace content |
| OLD | NEW |