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 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1101 *static_cast<const WebKeyboardEvent*>(input_event); | 1101 *static_cast<const WebKeyboardEvent*>(input_event); |
1102 prevent_default = WillHandleKeyEvent(key_event); | 1102 prevent_default = WillHandleKeyEvent(key_event); |
1103 } | 1103 } |
1104 | 1104 |
1105 if (WebInputEvent::isGestureEventType(input_event->type)) { | 1105 if (WebInputEvent::isGestureEventType(input_event->type)) { |
1106 const WebGestureEvent& gesture_event = | 1106 const WebGestureEvent& gesture_event = |
1107 *static_cast<const WebGestureEvent*>(input_event); | 1107 *static_cast<const WebGestureEvent*>(input_event); |
1108 prevent_default = prevent_default || WillHandleGestureEvent(gesture_event); | 1108 prevent_default = prevent_default || WillHandleGestureEvent(gesture_event); |
1109 } | 1109 } |
1110 | 1110 |
1111 if (input_event->type == WebInputEvent::GestureTap || | |
1112 input_event->type == WebInputEvent::GestureLongPress) | |
1113 resetInputMethod(); | |
1114 | |
1115 if (input_event->type == WebInputEvent::TouchStart) | 1111 if (input_event->type == WebInputEvent::TouchStart) |
1116 handling_touchstart_event_ = true; | 1112 handling_touchstart_event_ = true; |
1117 | 1113 |
1118 bool processed = prevent_default; | 1114 bool processed = prevent_default; |
1119 if (input_event->type != WebInputEvent::Char || !suppress_next_char_events_) { | 1115 if (input_event->type != WebInputEvent::Char || !suppress_next_char_events_) { |
1120 suppress_next_char_events_ = false; | 1116 suppress_next_char_events_ = false; |
1121 if (!processed && webwidget_) | 1117 if (!processed && webwidget_) |
1122 processed = webwidget_->handleInputEvent(*input_event); | 1118 processed = webwidget_->handleInputEvent(*input_event); |
1123 } | 1119 } |
1124 | 1120 |
(...skipping 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2877 surface_id(), | 2873 surface_id(), |
2878 GetURLForGraphicsContext3D(), | 2874 GetURLForGraphicsContext3D(), |
2879 gpu_channel_host.get(), | 2875 gpu_channel_host.get(), |
2880 attributes, | 2876 attributes, |
2881 false /* bind generates resources */, | 2877 false /* bind generates resources */, |
2882 limits)); | 2878 limits)); |
2883 return context.Pass(); | 2879 return context.Pass(); |
2884 } | 2880 } |
2885 | 2881 |
2886 } // namespace content | 2882 } // namespace content |
OLD | NEW |