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/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 2751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2762 | 2762 |
2763 bool RenderWidget::WillHandleGestureEvent( | 2763 bool RenderWidget::WillHandleGestureEvent( |
2764 const WebKit::WebGestureEvent& event) { | 2764 const WebKit::WebGestureEvent& event) { |
2765 return false; | 2765 return false; |
2766 } | 2766 } |
2767 | 2767 |
2768 void RenderWidget::hasTouchEventHandlers(bool has_handlers) { | 2768 void RenderWidget::hasTouchEventHandlers(bool has_handlers) { |
2769 Send(new ViewHostMsg_HasTouchEventHandlers(routing_id_, has_handlers)); | 2769 Send(new ViewHostMsg_HasTouchEventHandlers(routing_id_, has_handlers)); |
2770 } | 2770 } |
2771 | 2771 |
| 2772 void RenderWidget::setTouchAction(int touchId, bool touchActionDelayed, |
| 2773 WebWidgetClient::TouchAction touchAction) { |
| 2774 // TODO(rbyers): touch-action-delayed not yet used. crbug.com/241964 |
| 2775 content::TouchAction contentTouchAction; |
| 2776 switch(touchAction) { |
| 2777 case WebWidgetClient::TouchActionNone: |
| 2778 contentTouchAction = content::TOUCH_ACTION_NONE; |
| 2779 break; |
| 2780 case WebWidgetClient::TouchActionAuto: |
| 2781 contentTouchAction = content::TOUCH_ACTION_AUTO; |
| 2782 break; |
| 2783 default: |
| 2784 NOTREACHED(); |
| 2785 } |
| 2786 Send(new ViewHostMsg_SetTouchAction(routing_id_, touchId, |
| 2787 contentTouchAction)); |
| 2788 } |
| 2789 |
2772 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { | 2790 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { |
2773 return true; | 2791 return true; |
2774 } | 2792 } |
2775 | 2793 |
2776 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> | 2794 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> |
2777 RenderWidget::CreateGraphicsContext3D( | 2795 RenderWidget::CreateGraphicsContext3D( |
2778 const WebKit::WebGraphicsContext3D::Attributes& attributes) { | 2796 const WebKit::WebGraphicsContext3D::Attributes& attributes) { |
2779 if (!webwidget_) | 2797 if (!webwidget_) |
2780 return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>(); | 2798 return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>(); |
2781 if (CommandLine::ForCurrentProcess()->HasSwitch( | 2799 if (CommandLine::ForCurrentProcess()->HasSwitch( |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2824 GetURLForGraphicsContext3D(), | 2842 GetURLForGraphicsContext3D(), |
2825 gpu_channel_host.get(), | 2843 gpu_channel_host.get(), |
2826 swap_client, | 2844 swap_client, |
2827 attributes, | 2845 attributes, |
2828 false /* bind generates resources */, | 2846 false /* bind generates resources */, |
2829 limits)); | 2847 limits)); |
2830 return context.Pass(); | 2848 return context.Pass(); |
2831 } | 2849 } |
2832 | 2850 |
2833 } // namespace content | 2851 } // namespace content |
OLD | NEW |