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 2159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2170 target_host->Send(new InputMsg_SetEditCommandsForNextKeyEvent( | 2170 target_host->Send(new InputMsg_SetEditCommandsForNextKeyEvent( |
2171 target_host->GetRoutingID(), edit_commands)); | 2171 target_host->GetRoutingID(), edit_commands)); |
2172 target_host->ForwardKeyboardEvent(event); | 2172 target_host->ForwardKeyboardEvent(event); |
2173 return; | 2173 return; |
2174 } | 2174 } |
2175 #endif | 2175 #endif |
2176 | 2176 |
2177 target_host->ForwardKeyboardEvent(event); | 2177 target_host->ForwardKeyboardEvent(event); |
2178 } | 2178 } |
2179 | 2179 |
2180 void RenderWidgetHostViewAura::SelectionUpdated( | 2180 void RenderWidgetHostViewAura::SelectionUpdated( |
mohsen
2016/11/22 23:23:53
nit: This is apparently only called from one place
| |
2181 bool is_editable, | 2181 bool is_editable, |
2182 bool is_empty_text_form_control, | 2182 bool is_empty_text_form_control, |
2183 const gfx::SelectionBound& start, | 2183 const gfx::SelectionBound& start, |
2184 const gfx::SelectionBound& end) { | 2184 const gfx::SelectionBound& end) { |
2185 selection_controller_->OnSelectionEditable(is_editable); | |
2186 selection_controller_->OnSelectionEmpty(is_empty_text_form_control); | |
2187 selection_controller_->OnSelectionBoundsChanged(start, end); | 2185 selection_controller_->OnSelectionBoundsChanged(start, end); |
2188 } | 2186 } |
2189 | 2187 |
2190 void RenderWidgetHostViewAura::CreateSelectionController() { | 2188 void RenderWidgetHostViewAura::CreateSelectionController() { |
2191 ui::TouchSelectionController::Config tsc_config; | 2189 ui::TouchSelectionController::Config tsc_config; |
2192 tsc_config.max_tap_duration = base::TimeDelta::FromMilliseconds( | 2190 tsc_config.max_tap_duration = base::TimeDelta::FromMilliseconds( |
2193 ui::GestureConfiguration::GetInstance()->long_press_time_in_ms()); | 2191 ui::GestureConfiguration::GetInstance()->long_press_time_in_ms()); |
2194 tsc_config.tap_slop = ui::GestureConfiguration::GetInstance() | 2192 tsc_config.tap_slop = ui::GestureConfiguration::GetInstance() |
2195 ->max_touch_move_in_pixels_for_click(); | 2193 ->max_touch_move_in_pixels_for_click(); |
2196 tsc_config.enable_longpress_drag_selection = false; | 2194 tsc_config.enable_longpress_drag_selection = false; |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2387 | 2385 |
2388 void RenderWidgetHostViewAura::SetPopupChild( | 2386 void RenderWidgetHostViewAura::SetPopupChild( |
2389 RenderWidgetHostViewAura* popup_child_host_view) { | 2387 RenderWidgetHostViewAura* popup_child_host_view) { |
2390 popup_child_host_view_ = popup_child_host_view; | 2388 popup_child_host_view_ = popup_child_host_view; |
2391 event_handler_->SetPopupChild( | 2389 event_handler_->SetPopupChild( |
2392 popup_child_host_view, | 2390 popup_child_host_view, |
2393 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); | 2391 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); |
2394 } | 2392 } |
2395 | 2393 |
2396 } // namespace content | 2394 } // namespace content |
OLD | NEW |