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 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1091 *static_cast<const WebKeyboardEvent*>(input_event); | 1091 *static_cast<const WebKeyboardEvent*>(input_event); |
1092 prevent_default = WillHandleKeyEvent(key_event); | 1092 prevent_default = WillHandleKeyEvent(key_event); |
1093 } | 1093 } |
1094 | 1094 |
1095 if (WebInputEvent::isGestureEventType(input_event->type)) { | 1095 if (WebInputEvent::isGestureEventType(input_event->type)) { |
1096 const WebGestureEvent& gesture_event = | 1096 const WebGestureEvent& gesture_event = |
1097 *static_cast<const WebGestureEvent*>(input_event); | 1097 *static_cast<const WebGestureEvent*>(input_event); |
1098 prevent_default = prevent_default || WillHandleGestureEvent(gesture_event); | 1098 prevent_default = prevent_default || WillHandleGestureEvent(gesture_event); |
1099 } | 1099 } |
1100 | 1100 |
1101 if (input_event->type == WebInputEvent::GestureTap || | |
1102 input_event->type == WebInputEvent::GestureLongPress) | |
1103 resetInputMethod(); | |
1104 | |
1105 bool processed = prevent_default; | 1101 bool processed = prevent_default; |
1106 if (input_event->type != WebInputEvent::Char || !suppress_next_char_events_) { | 1102 if (input_event->type != WebInputEvent::Char || !suppress_next_char_events_) { |
1107 suppress_next_char_events_ = false; | 1103 suppress_next_char_events_ = false; |
1108 if (!processed && webwidget_) | 1104 if (!processed && webwidget_) |
1109 processed = webwidget_->handleInputEvent(*input_event); | 1105 processed = webwidget_->handleInputEvent(*input_event); |
1110 } | 1106 } |
1111 | 1107 |
1112 // If this RawKeyDown event corresponds to a browser keyboard shortcut and | 1108 // If this RawKeyDown event corresponds to a browser keyboard shortcut and |
1113 // it's not processed by webkit, then we need to suppress the upcoming Char | 1109 // it's not processed by webkit, then we need to suppress the upcoming Char |
1114 // events. | 1110 // events. |
(...skipping 1709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2824 GetURLForGraphicsContext3D(), | 2820 GetURLForGraphicsContext3D(), |
2825 gpu_channel_host.get(), | 2821 gpu_channel_host.get(), |
2826 swap_client, | 2822 swap_client, |
2827 attributes, | 2823 attributes, |
2828 false /* bind generates resources */, | 2824 false /* bind generates resources */, |
2829 limits)); | 2825 limits)); |
2830 return context.Pass(); | 2826 return context.Pass(); |
2831 } | 2827 } |
2832 | 2828 |
2833 } // namespace content | 2829 } // namespace content |
OLD | NEW |