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/debug/trace_event_synthetic_delay.h" | 10 #include "base/debug/trace_event_synthetic_delay.h" |
(...skipping 2701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2712 enum_values_must_match_for_touch_action); | 2712 enum_values_must_match_for_touch_action); |
2713 COMPILE_ASSERT(static_cast<blink::WebTouchAction>(TOUCH_ACTION_NONE) == | 2713 COMPILE_ASSERT(static_cast<blink::WebTouchAction>(TOUCH_ACTION_NONE) == |
2714 blink::WebTouchActionNone, | 2714 blink::WebTouchActionNone, |
2715 enum_values_must_match_for_touch_action); | 2715 enum_values_must_match_for_touch_action); |
2716 COMPILE_ASSERT(static_cast<blink::WebTouchAction>(TOUCH_ACTION_PAN_X) == | 2716 COMPILE_ASSERT(static_cast<blink::WebTouchAction>(TOUCH_ACTION_PAN_X) == |
2717 blink::WebTouchActionPanX, | 2717 blink::WebTouchActionPanX, |
2718 enum_values_must_match_for_touch_action); | 2718 enum_values_must_match_for_touch_action); |
2719 COMPILE_ASSERT(static_cast<blink::WebTouchAction>(TOUCH_ACTION_PAN_Y) == | 2719 COMPILE_ASSERT(static_cast<blink::WebTouchAction>(TOUCH_ACTION_PAN_Y) == |
2720 blink::WebTouchActionPanY, | 2720 blink::WebTouchActionPanY, |
2721 enum_values_must_match_for_touch_action); | 2721 enum_values_must_match_for_touch_action); |
| 2722 COMPILE_ASSERT( |
| 2723 static_cast<blink::WebTouchAction>(TOUCH_ACTION_PINCH_ZOOM) == |
| 2724 blink::WebTouchActionPinchZoom, |
| 2725 enum_values_must_match_for_touch_action); |
2722 | 2726 |
2723 content::TouchAction content_touch_action = | 2727 content::TouchAction content_touch_action = |
2724 static_cast<content::TouchAction>(web_touch_action); | 2728 static_cast<content::TouchAction>(web_touch_action); |
2725 Send(new InputHostMsg_SetTouchAction(routing_id_, content_touch_action)); | 2729 Send(new InputHostMsg_SetTouchAction(routing_id_, content_touch_action)); |
2726 } | 2730 } |
2727 | 2731 |
2728 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { | 2732 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { |
2729 return true; | 2733 return true; |
2730 } | 2734 } |
2731 | 2735 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2784 | 2788 |
2785 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { | 2789 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { |
2786 swapped_out_frames_.AddObserver(frame); | 2790 swapped_out_frames_.AddObserver(frame); |
2787 } | 2791 } |
2788 | 2792 |
2789 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { | 2793 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { |
2790 swapped_out_frames_.RemoveObserver(frame); | 2794 swapped_out_frames_.RemoveObserver(frame); |
2791 } | 2795 } |
2792 | 2796 |
2793 } // namespace content | 2797 } // namespace content |
OLD | NEW |