| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/renderer_host/render_widget_host.h" | 5 #include "content/browser/renderer_host/render_widget_host.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 | 542 |
| 543 void RenderWidgetHost::StopHangMonitorTimeout() { | 543 void RenderWidgetHost::StopHangMonitorTimeout() { |
| 544 time_when_considered_hung_ = Time(); | 544 time_when_considered_hung_ = Time(); |
| 545 RendererIsResponsive(); | 545 RendererIsResponsive(); |
| 546 | 546 |
| 547 // We do not bother to stop the hung_renderer_timer_ here in case it will be | 547 // We do not bother to stop the hung_renderer_timer_ here in case it will be |
| 548 // started again shortly, which happens to be the common use case. | 548 // started again shortly, which happens to be the common use case. |
| 549 } | 549 } |
| 550 | 550 |
| 551 void RenderWidgetHost::ForwardMouseEvent(const WebMouseEvent& mouse_event) { | 551 void RenderWidgetHost::ForwardMouseEvent(const WebMouseEvent& mouse_event) { |
| 552 TRACE_EVENT0("renderer_host", "RenderWidgetHost::ForwardMouseEvent"); | 552 TRACE_EVENT2("renderer_host", "RenderWidgetHost::ForwardMouseEvent", |
| 553 "x", mouse_event.x, "y", mouse_event.y); |
| 553 if (ignore_input_events_ || process_->IgnoreInputEvents()) | 554 if (ignore_input_events_ || process_->IgnoreInputEvents()) |
| 554 return; | 555 return; |
| 555 | 556 |
| 556 // Avoid spamming the renderer with mouse move events. It is important | 557 // Avoid spamming the renderer with mouse move events. It is important |
| 557 // to note that WM_MOUSEMOVE events are anyways synthetic, but since our | 558 // to note that WM_MOUSEMOVE events are anyways synthetic, but since our |
| 558 // thread is able to rapidly consume WM_MOUSEMOVE events, we may get way | 559 // thread is able to rapidly consume WM_MOUSEMOVE events, we may get way |
| 559 // more WM_MOUSEMOVE events than we wish to send to the renderer. | 560 // more WM_MOUSEMOVE events than we wish to send to the renderer. |
| 560 if (mouse_event.type == WebInputEvent::MouseMove) { | 561 if (mouse_event.type == WebInputEvent::MouseMove) { |
| 561 if (mouse_move_pending_) { | 562 if (mouse_move_pending_) { |
| 562 if (!next_mouse_move_.get()) { | 563 if (!next_mouse_move_.get()) { |
| (...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1550 } | 1551 } |
| 1551 | 1552 |
| 1552 // static | 1553 // static |
| 1553 void RenderWidgetHost::AcknowledgePostSubBuffer(int32 route_id, | 1554 void RenderWidgetHost::AcknowledgePostSubBuffer(int32 route_id, |
| 1554 int gpu_host_id) { | 1555 int gpu_host_id) { |
| 1555 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); | 1556 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); |
| 1556 if (ui_shim) | 1557 if (ui_shim) |
| 1557 ui_shim->Send(new AcceleratedSurfaceMsg_PostSubBufferACK(route_id)); | 1558 ui_shim->Send(new AcceleratedSurfaceMsg_PostSubBufferACK(route_id)); |
| 1558 } | 1559 } |
| 1559 #endif | 1560 #endif |
| OLD | NEW |