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