| 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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 | 547 |
| 548 void RenderWidgetHost::StopHangMonitorTimeout() { | 548 void RenderWidgetHost::StopHangMonitorTimeout() { |
| 549 time_when_considered_hung_ = Time(); | 549 time_when_considered_hung_ = Time(); |
| 550 RendererIsResponsive(); | 550 RendererIsResponsive(); |
| 551 | 551 |
| 552 // We do not bother to stop the hung_renderer_timer_ here in case it will be | 552 // We do not bother to stop the hung_renderer_timer_ here in case it will be |
| 553 // started again shortly, which happens to be the common use case. | 553 // started again shortly, which happens to be the common use case. |
| 554 } | 554 } |
| 555 | 555 |
| 556 void RenderWidgetHost::ForwardMouseEvent(const WebMouseEvent& mouse_event) { | 556 void RenderWidgetHost::ForwardMouseEvent(const WebMouseEvent& mouse_event) { |
| 557 TRACE_EVENT0("renderer_host", "RenderWidgetHost::ForwardMouseEvent"); | 557 TRACE_EVENT2("renderer_host", "RenderWidgetHost::ForwardMouseEvent", |
| 558 "x", mouse_event.x, "y", mouse_event.y); |
| 558 if (ignore_input_events_ || process_->IgnoreInputEvents()) | 559 if (ignore_input_events_ || process_->IgnoreInputEvents()) |
| 559 return; | 560 return; |
| 560 | 561 |
| 561 // Avoid spamming the renderer with mouse move events. It is important | 562 // Avoid spamming the renderer with mouse move events. It is important |
| 562 // to note that WM_MOUSEMOVE events are anyways synthetic, but since our | 563 // to note that WM_MOUSEMOVE events are anyways synthetic, but since our |
| 563 // thread is able to rapidly consume WM_MOUSEMOVE events, we may get way | 564 // thread is able to rapidly consume WM_MOUSEMOVE events, we may get way |
| 564 // more WM_MOUSEMOVE events than we wish to send to the renderer. | 565 // more WM_MOUSEMOVE events than we wish to send to the renderer. |
| 565 if (mouse_event.type == WebInputEvent::MouseMove) { | 566 if (mouse_event.type == WebInputEvent::MouseMove) { |
| 566 if (mouse_move_pending_) { | 567 if (mouse_move_pending_) { |
| 567 if (!next_mouse_move_.get()) { | 568 if (!next_mouse_move_.get()) { |
| (...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1530 ui_shim->Send(new AcceleratedSurfaceMsg_BuffersSwappedACK(route_id)); | 1531 ui_shim->Send(new AcceleratedSurfaceMsg_BuffersSwappedACK(route_id)); |
| 1531 } | 1532 } |
| 1532 | 1533 |
| 1533 // static | 1534 // static |
| 1534 void RenderWidgetHost::AcknowledgePostSubBuffer(int32 route_id, | 1535 void RenderWidgetHost::AcknowledgePostSubBuffer(int32 route_id, |
| 1535 int gpu_host_id) { | 1536 int gpu_host_id) { |
| 1536 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); | 1537 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); |
| 1537 if (ui_shim) | 1538 if (ui_shim) |
| 1538 ui_shim->Send(new AcceleratedSurfaceMsg_PostSubBufferACK(route_id)); | 1539 ui_shim->Send(new AcceleratedSurfaceMsg_PostSubBufferACK(route_id)); |
| 1539 } | 1540 } |
| OLD | NEW |