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 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1062 } | 1062 } |
1063 | 1063 |
1064 base::TimeTicks start_time; | 1064 base::TimeTicks start_time; |
1065 if (base::TimeTicks::IsHighResNowFastAndReliable()) | 1065 if (base::TimeTicks::IsHighResNowFastAndReliable()) |
1066 start_time = base::TimeTicks::HighResNow(); | 1066 start_time = base::TimeTicks::HighResNow(); |
1067 | 1067 |
1068 const char* const event_name = | 1068 const char* const event_name = |
1069 WebInputEventTraits::GetName(input_event->type); | 1069 WebInputEventTraits::GetName(input_event->type); |
1070 TRACE_EVENT1("renderer", "RenderWidget::OnHandleInputEvent", | 1070 TRACE_EVENT1("renderer", "RenderWidget::OnHandleInputEvent", |
1071 "event", event_name); | 1071 "event", event_name); |
| 1072 TRACE_EVENT_SYNTHETIC_ACTIVATE("blink.HandleInputEvent"); |
1072 | 1073 |
1073 if (compositor_) | 1074 if (compositor_) |
1074 compositor_->SetLatencyInfo(latency_info); | 1075 compositor_->SetLatencyInfo(latency_info); |
1075 else | 1076 else |
1076 latency_info_.MergeWith(latency_info); | 1077 latency_info_.MergeWith(latency_info); |
1077 | 1078 |
1078 base::TimeDelta now = base::TimeDelta::FromInternalValue( | 1079 base::TimeDelta now = base::TimeDelta::FromInternalValue( |
1079 base::TimeTicks::Now().ToInternalValue()); | 1080 base::TimeTicks::Now().ToInternalValue()); |
1080 | 1081 |
1081 int64 delta = static_cast<int64>( | 1082 int64 delta = static_cast<int64>( |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1186 Send(response); | 1187 Send(response); |
1187 } | 1188 } |
1188 | 1189 |
1189 #if defined(OS_ANDROID) | 1190 #if defined(OS_ANDROID) |
1190 // Allow the IME to be shown when the focus changes as a consequence | 1191 // Allow the IME to be shown when the focus changes as a consequence |
1191 // of a processed touch end event. | 1192 // of a processed touch end event. |
1192 if (input_event->type == WebInputEvent::TouchEnd && processed) | 1193 if (input_event->type == WebInputEvent::TouchEnd && processed) |
1193 UpdateTextInputState(true, true); | 1194 UpdateTextInputState(true, true); |
1194 #endif | 1195 #endif |
1195 | 1196 |
| 1197 TRACE_EVENT_SYNTHETIC_APPLY("blink.HandleInputEvent"); |
1196 handling_input_event_ = false; | 1198 handling_input_event_ = false; |
1197 | 1199 |
1198 if (!prevent_default) { | 1200 if (!prevent_default) { |
1199 if (WebInputEvent::isKeyboardEventType(input_event->type)) | 1201 if (WebInputEvent::isKeyboardEventType(input_event->type)) |
1200 DidHandleKeyEvent(); | 1202 DidHandleKeyEvent(); |
1201 if (WebInputEvent::isMouseEventType(input_event->type)) | 1203 if (WebInputEvent::isMouseEventType(input_event->type)) |
1202 DidHandleMouseEvent(*(static_cast<const WebMouseEvent*>(input_event))); | 1204 DidHandleMouseEvent(*(static_cast<const WebMouseEvent*>(input_event))); |
1203 if (WebInputEvent::isTouchEventType(input_event->type)) | 1205 if (WebInputEvent::isTouchEventType(input_event->type)) |
1204 DidHandleTouchEvent(*(static_cast<const WebTouchEvent*>(input_event))); | 1206 DidHandleTouchEvent(*(static_cast<const WebTouchEvent*>(input_event))); |
1205 } | 1207 } |
(...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2842 GetURLForGraphicsContext3D(), | 2844 GetURLForGraphicsContext3D(), |
2843 gpu_channel_host.get(), | 2845 gpu_channel_host.get(), |
2844 use_echo_for_swap_ack, | 2846 use_echo_for_swap_ack, |
2845 attributes, | 2847 attributes, |
2846 false /* bind generates resources */, | 2848 false /* bind generates resources */, |
2847 limits)); | 2849 limits)); |
2848 return context.Pass(); | 2850 return context.Pass(); |
2849 } | 2851 } |
2850 | 2852 |
2851 } // namespace content | 2853 } // namespace content |
OLD | NEW |