Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(435)

Side by Side Diff: content/renderer/render_widget.cc

Issue 67383002: Initial browser-side implementation for touch-action (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add back accidentally removed line Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 2765 matching lines...) Expand 10 before | Expand all | Expand 10 after
2776 2776
2777 bool RenderWidget::WillHandleGestureEvent( 2777 bool RenderWidget::WillHandleGestureEvent(
2778 const blink::WebGestureEvent& event) { 2778 const blink::WebGestureEvent& event) {
2779 return false; 2779 return false;
2780 } 2780 }
2781 2781
2782 void RenderWidget::hasTouchEventHandlers(bool has_handlers) { 2782 void RenderWidget::hasTouchEventHandlers(bool has_handlers) {
2783 Send(new ViewHostMsg_HasTouchEventHandlers(routing_id_, has_handlers)); 2783 Send(new ViewHostMsg_HasTouchEventHandlers(routing_id_, has_handlers));
2784 } 2784 }
2785 2785
2786 void RenderWidget::setTouchAction(int touchId,
2787 WebWidgetClient::TouchAction touchAction) {
2788 content::TouchAction contentTouchAction;
sadrul 2013/11/19 10:36:44 touch_id, touch_action, etc.
Rick Byers 2013/11/19 22:14:59 Dammit, sorry - I'll never get used to switching b
2789 switch(touchAction) {
2790 case WebWidgetClient::TouchActionNone:
sadrul 2013/11/19 10:36:44 indent
Rick Byers 2013/11/19 22:14:59 Done.
2791 contentTouchAction = content::TOUCH_ACTION_NONE;
2792 break;
2793 case WebWidgetClient::TouchActionAuto:
2794 contentTouchAction = content::TOUCH_ACTION_AUTO;
2795 break;
2796 default:
2797 NOTREACHED();
2798 }
2799 Send(new ViewHostMsg_SetTouchAction(routing_id_, touchId,
2800 contentTouchAction));
2801 }
2802
2786 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { 2803 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const {
2787 return true; 2804 return true;
2788 } 2805 }
2789 2806
2790 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> 2807 scoped_ptr<WebGraphicsContext3DCommandBufferImpl>
2791 RenderWidget::CreateGraphicsContext3D( 2808 RenderWidget::CreateGraphicsContext3D(
2792 const blink::WebGraphicsContext3D::Attributes& attributes) { 2809 const blink::WebGraphicsContext3D::Attributes& attributes) {
2793 if (!webwidget_) 2810 if (!webwidget_)
2794 return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>(); 2811 return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>();
2795 if (CommandLine::ForCurrentProcess()->HasSwitch( 2812 if (CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
2842 GetURLForGraphicsContext3D(), 2859 GetURLForGraphicsContext3D(),
2843 gpu_channel_host.get(), 2860 gpu_channel_host.get(),
2844 use_echo_for_swap_ack, 2861 use_echo_for_swap_ack,
2845 attributes, 2862 attributes,
2846 false /* bind generates resources */, 2863 false /* bind generates resources */,
2847 limits)); 2864 limits));
2848 return context.Pass(); 2865 return context.Pass();
2849 } 2866 }
2850 2867
2851 } // namespace content 2868 } // namespace content
OLDNEW
« content/public/common/touch_action.h ('K') | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698