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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1105 *static_cast<const WebKeyboardEvent*>(input_event); | 1105 *static_cast<const WebKeyboardEvent*>(input_event); |
1106 prevent_default = WillHandleKeyEvent(key_event); | 1106 prevent_default = WillHandleKeyEvent(key_event); |
1107 } | 1107 } |
1108 | 1108 |
1109 if (WebInputEvent::isGestureEventType(input_event->type)) { | 1109 if (WebInputEvent::isGestureEventType(input_event->type)) { |
1110 const WebGestureEvent& gesture_event = | 1110 const WebGestureEvent& gesture_event = |
1111 *static_cast<const WebGestureEvent*>(input_event); | 1111 *static_cast<const WebGestureEvent*>(input_event); |
1112 prevent_default = prevent_default || WillHandleGestureEvent(gesture_event); | 1112 prevent_default = prevent_default || WillHandleGestureEvent(gesture_event); |
1113 } | 1113 } |
1114 | 1114 |
1115 if (input_event->type == WebInputEvent::GestureTap || | |
1116 input_event->type == WebInputEvent::GestureLongPress) | |
1117 resetInputMethod(); | |
1118 | |
1119 bool processed = prevent_default; | 1115 bool processed = prevent_default; |
1120 if (input_event->type != WebInputEvent::Char || !suppress_next_char_events_) { | 1116 if (input_event->type != WebInputEvent::Char || !suppress_next_char_events_) { |
1121 suppress_next_char_events_ = false; | 1117 suppress_next_char_events_ = false; |
1122 if (!processed && webwidget_) | 1118 if (!processed && webwidget_) |
1123 processed = webwidget_->handleInputEvent(*input_event); | 1119 processed = webwidget_->handleInputEvent(*input_event); |
1124 } | 1120 } |
1125 | 1121 |
1126 // If this RawKeyDown event corresponds to a browser keyboard shortcut and | 1122 // If this RawKeyDown event corresponds to a browser keyboard shortcut and |
1127 // it's not processed by webkit, then we need to suppress the upcoming Char | 1123 // it's not processed by webkit, then we need to suppress the upcoming Char |
1128 // events. | 1124 // events. |
(...skipping 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2842 GetURLForGraphicsContext3D(), | 2838 GetURLForGraphicsContext3D(), |
2843 gpu_channel_host.get(), | 2839 gpu_channel_host.get(), |
2844 use_echo_for_swap_ack, | 2840 use_echo_for_swap_ack, |
2845 attributes, | 2841 attributes, |
2846 false /* bind generates resources */, | 2842 false /* bind generates resources */, |
2847 limits)); | 2843 limits)); |
2848 return context.Pass(); | 2844 return context.Pass(); |
2849 } | 2845 } |
2850 | 2846 |
2851 } // namespace content | 2847 } // namespace content |
OLD | NEW |