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 2769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2780 tsc_config.enable_longpress_drag_selection = false; | 2780 tsc_config.enable_longpress_drag_selection = false; |
2781 selection_controller_.reset(new ui::TouchSelectionController( | 2781 selection_controller_.reset(new ui::TouchSelectionController( |
2782 selection_controller_client_.get(), tsc_config)); | 2782 selection_controller_client_.get(), tsc_config)); |
2783 } | 2783 } |
2784 | 2784 |
2785 void RenderWidgetHostViewAura::HandleGestureForTouchSelection( | 2785 void RenderWidgetHostViewAura::HandleGestureForTouchSelection( |
2786 ui::GestureEvent* event) { | 2786 ui::GestureEvent* event) { |
2787 switch (event->type()) { | 2787 switch (event->type()) { |
2788 case ui::ET_GESTURE_LONG_PRESS: | 2788 case ui::ET_GESTURE_LONG_PRESS: |
2789 if (selection_controller_->WillHandleLongPressEvent( | 2789 if (selection_controller_->WillHandleLongPressEvent( |
2790 base::TimeTicks() + event->time_stamp(), event->location_f())) { | 2790 event->time_stamp(), event->location_f())) { |
2791 event->SetHandled(); | 2791 event->SetHandled(); |
2792 } | 2792 } |
2793 break; | 2793 break; |
2794 case ui::ET_GESTURE_TAP: | 2794 case ui::ET_GESTURE_TAP: |
2795 if (selection_controller_->WillHandleTapEvent( | 2795 if (selection_controller_->WillHandleTapEvent( |
2796 event->location_f(), event->details().tap_count())) { | 2796 event->location_f(), event->details().tap_count())) { |
2797 event->SetHandled(); | 2797 event->SetHandled(); |
2798 } | 2798 } |
2799 break; | 2799 break; |
2800 case ui::ET_GESTURE_SCROLL_BEGIN: | 2800 case ui::ET_GESTURE_SCROLL_BEGIN: |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2990 | 2990 |
2991 //////////////////////////////////////////////////////////////////////////////// | 2991 //////////////////////////////////////////////////////////////////////////////// |
2992 // RenderWidgetHostViewBase, public: | 2992 // RenderWidgetHostViewBase, public: |
2993 | 2993 |
2994 // static | 2994 // static |
2995 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2995 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
2996 GetScreenInfoForWindow(results, NULL); | 2996 GetScreenInfoForWindow(results, NULL); |
2997 } | 2997 } |
2998 | 2998 |
2999 } // namespace content | 2999 } // namespace content |
OLD | NEW |