| 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 2641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2652 tsc_config.enable_longpress_drag_selection = false; | 2652 tsc_config.enable_longpress_drag_selection = false; |
| 2653 selection_controller_.reset(new ui::TouchSelectionController( | 2653 selection_controller_.reset(new ui::TouchSelectionController( |
| 2654 selection_controller_client_.get(), tsc_config)); | 2654 selection_controller_client_.get(), tsc_config)); |
| 2655 } | 2655 } |
| 2656 | 2656 |
| 2657 void RenderWidgetHostViewAura::HandleGestureForTouchSelection( | 2657 void RenderWidgetHostViewAura::HandleGestureForTouchSelection( |
| 2658 ui::GestureEvent* event) { | 2658 ui::GestureEvent* event) { |
| 2659 switch (event->type()) { | 2659 switch (event->type()) { |
| 2660 case ui::ET_GESTURE_LONG_PRESS: | 2660 case ui::ET_GESTURE_LONG_PRESS: |
| 2661 if (selection_controller_->WillHandleLongPressEvent( | 2661 if (selection_controller_->WillHandleLongPressEvent( |
| 2662 base::TimeTicks() + event->time_stamp(), event->location_f())) { | 2662 event->time_stamp(), event->location_f())) { |
| 2663 event->SetHandled(); | 2663 event->SetHandled(); |
| 2664 } | 2664 } |
| 2665 break; | 2665 break; |
| 2666 case ui::ET_GESTURE_TAP: | 2666 case ui::ET_GESTURE_TAP: |
| 2667 if (selection_controller_->WillHandleTapEvent( | 2667 if (selection_controller_->WillHandleTapEvent( |
| 2668 event->location_f(), event->details().tap_count())) { | 2668 event->location_f(), event->details().tap_count())) { |
| 2669 event->SetHandled(); | 2669 event->SetHandled(); |
| 2670 } | 2670 } |
| 2671 break; | 2671 break; |
| 2672 case ui::ET_GESTURE_SCROLL_BEGIN: | 2672 case ui::ET_GESTURE_SCROLL_BEGIN: |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2862 | 2862 |
| 2863 //////////////////////////////////////////////////////////////////////////////// | 2863 //////////////////////////////////////////////////////////////////////////////// |
| 2864 // RenderWidgetHostViewBase, public: | 2864 // RenderWidgetHostViewBase, public: |
| 2865 | 2865 |
| 2866 // static | 2866 // static |
| 2867 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2867 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2868 GetScreenInfoForWindow(results, NULL); | 2868 GetScreenInfoForWindow(results, NULL); |
| 2869 } | 2869 } |
| 2870 | 2870 |
| 2871 } // namespace content | 2871 } // namespace content |
| OLD | NEW |