| 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 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1090 end_edge_top.Scale(viewportToDIPScale); | 1090 end_edge_top.Scale(viewportToDIPScale); |
| 1091 end_edge_bottom.Scale(viewportToDIPScale); | 1091 end_edge_bottom.Scale(viewportToDIPScale); |
| 1092 | 1092 |
| 1093 selection.start.SetEdge(start_edge_top, start_edge_bottom); | 1093 selection.start.SetEdge(start_edge_top, start_edge_bottom); |
| 1094 selection.end.SetEdge(end_edge_top, end_edge_bottom); | 1094 selection.end.SetEdge(end_edge_top, end_edge_bottom); |
| 1095 } | 1095 } |
| 1096 | 1096 |
| 1097 delegated_frame_host_->SwapDelegatedFrame(output_surface_id, | 1097 delegated_frame_host_->SwapDelegatedFrame(output_surface_id, |
| 1098 std::move(frame)); | 1098 std::move(frame)); |
| 1099 SelectionUpdated(selection.is_editable, selection.is_empty_text_form_control, | 1099 SelectionUpdated(selection.is_editable, selection.is_empty_text_form_control, |
| 1100 selection.start, selection.end); | 1100 selection.is_handle_visible, selection.start, selection.end); |
| 1101 } | 1101 } |
| 1102 | 1102 |
| 1103 void RenderWidgetHostViewAura::ClearCompositorFrame() { | 1103 void RenderWidgetHostViewAura::ClearCompositorFrame() { |
| 1104 delegated_frame_host_->ClearDelegatedFrame(); | 1104 delegated_frame_host_->ClearDelegatedFrame(); |
| 1105 } | 1105 } |
| 1106 | 1106 |
| 1107 void RenderWidgetHostViewAura::DidStopFlinging() { | 1107 void RenderWidgetHostViewAura::DidStopFlinging() { |
| 1108 selection_controller_client_->OnScrollCompleted(); | 1108 selection_controller_client_->OnScrollCompleted(); |
| 1109 } | 1109 } |
| 1110 | 1110 |
| (...skipping 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2755 return; | 2755 return; |
| 2756 } | 2756 } |
| 2757 #endif | 2757 #endif |
| 2758 | 2758 |
| 2759 target_host->ForwardKeyboardEvent(event); | 2759 target_host->ForwardKeyboardEvent(event); |
| 2760 } | 2760 } |
| 2761 | 2761 |
| 2762 void RenderWidgetHostViewAura::SelectionUpdated( | 2762 void RenderWidgetHostViewAura::SelectionUpdated( |
| 2763 bool is_editable, | 2763 bool is_editable, |
| 2764 bool is_empty_text_form_control, | 2764 bool is_empty_text_form_control, |
| 2765 bool is_handle_visible, |
| 2765 const gfx::SelectionBound& start, | 2766 const gfx::SelectionBound& start, |
| 2766 const gfx::SelectionBound& end) { | 2767 const gfx::SelectionBound& end) { |
| 2767 selection_controller_->OnSelectionEditable(is_editable); | 2768 selection_controller_->OnSelectionEditable(is_editable); |
| 2768 selection_controller_->OnSelectionEmpty(is_empty_text_form_control); | 2769 selection_controller_->OnSelectionEmpty(is_empty_text_form_control); |
| 2769 selection_controller_->OnSelectionBoundsChanged(start, end); | 2770 selection_controller_->OnSelectionBoundsChanged( |
| 2771 start, end, is_handle_visible); |
| 2770 } | 2772 } |
| 2771 | 2773 |
| 2772 void RenderWidgetHostViewAura::CreateSelectionController() { | 2774 void RenderWidgetHostViewAura::CreateSelectionController() { |
| 2773 ui::TouchSelectionController::Config tsc_config; | 2775 ui::TouchSelectionController::Config tsc_config; |
| 2774 tsc_config.max_tap_duration = base::TimeDelta::FromMilliseconds( | 2776 tsc_config.max_tap_duration = base::TimeDelta::FromMilliseconds( |
| 2775 ui::GestureConfiguration::GetInstance()->long_press_time_in_ms()); | 2777 ui::GestureConfiguration::GetInstance()->long_press_time_in_ms()); |
| 2776 tsc_config.tap_slop = ui::GestureConfiguration::GetInstance() | 2778 tsc_config.tap_slop = ui::GestureConfiguration::GetInstance() |
| 2777 ->max_touch_move_in_pixels_for_click(); | 2779 ->max_touch_move_in_pixels_for_click(); |
| 2778 tsc_config.show_on_tap_for_empty_editable = false; | 2780 tsc_config.show_on_tap_for_empty_editable = false; |
| 2779 tsc_config.enable_longpress_drag_selection = false; | 2781 tsc_config.enable_longpress_drag_selection = false; |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3064 | 3066 |
| 3065 //////////////////////////////////////////////////////////////////////////////// | 3067 //////////////////////////////////////////////////////////////////////////////// |
| 3066 // RenderWidgetHostViewBase, public: | 3068 // RenderWidgetHostViewBase, public: |
| 3067 | 3069 |
| 3068 // static | 3070 // static |
| 3069 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 3071 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 3070 GetScreenInfoForWindow(results, NULL); | 3072 GetScreenInfoForWindow(results, NULL); |
| 3071 } | 3073 } |
| 3072 | 3074 |
| 3073 } // namespace content | 3075 } // namespace content |
| OLD | NEW |