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/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 GetRoutingID(), last_view_screen_rect_, last_window_screen_rect_)); | 378 GetRoutingID(), last_view_screen_rect_, last_window_screen_rect_)); |
379 if (delegate_) | 379 if (delegate_) |
380 delegate_->DidSendScreenRects(this); | 380 delegate_->DidSendScreenRects(this); |
381 waiting_for_screen_rects_ack_ = true; | 381 waiting_for_screen_rects_ack_ = true; |
382 } | 382 } |
383 | 383 |
384 void RenderWidgetHostImpl::SuppressNextCharEvents() { | 384 void RenderWidgetHostImpl::SuppressNextCharEvents() { |
385 suppress_next_char_events_ = true; | 385 suppress_next_char_events_ = true; |
386 } | 386 } |
387 | 387 |
388 void RenderWidgetHostImpl::FlushInput() { | 388 void RenderWidgetHostImpl::FlushInput(base::TimeTicks frame_time) { |
389 input_router_->RequestNotificationWhenFlushed(); | |
390 if (synthetic_gesture_controller_) | 389 if (synthetic_gesture_controller_) |
391 synthetic_gesture_controller_->Flush(base::TimeTicks::Now()); | 390 synthetic_gesture_controller_->Flush(frame_time); |
392 } | 391 input_router_->FlushInput(frame_time); |
393 | |
394 void RenderWidgetHostImpl::SetNeedsFlush() { | |
395 if (view_) | |
396 view_->OnSetNeedsFlushInput(); | |
397 } | 392 } |
398 | 393 |
399 void RenderWidgetHostImpl::Init() { | 394 void RenderWidgetHostImpl::Init() { |
400 DCHECK(process_->HasConnection()); | 395 DCHECK(process_->HasConnection()); |
401 | 396 |
402 renderer_initialized_ = true; | 397 renderer_initialized_ = true; |
403 | 398 |
404 GetProcess()->ResumeRequestsForView(routing_id_); | 399 GetProcess()->ResumeRequestsForView(routing_id_); |
405 | 400 |
406 // If the RWHV has not yet been set, the surface ID namespace will get | 401 // If the RWHV has not yet been set, the surface ID namespace will get |
(...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1876 // The renderer is responsive, but there are in-flight events to wait for. | 1871 // The renderer is responsive, but there are in-flight events to wait for. |
1877 if (!is_hidden_) | 1872 if (!is_hidden_) |
1878 RestartHangMonitorTimeout(); | 1873 RestartHangMonitorTimeout(); |
1879 } | 1874 } |
1880 } | 1875 } |
1881 | 1876 |
1882 void RenderWidgetHostImpl::OnHasTouchEventHandlers(bool has_handlers) { | 1877 void RenderWidgetHostImpl::OnHasTouchEventHandlers(bool has_handlers) { |
1883 has_touch_handler_ = has_handlers; | 1878 has_touch_handler_ = has_handlers; |
1884 } | 1879 } |
1885 | 1880 |
1886 void RenderWidgetHostImpl::DidFlush() { | 1881 void RenderWidgetHostImpl::SetNeedsFlushInput() { |
| 1882 if (view_) |
| 1883 view_->OnSetNeedsFlushInput(); |
| 1884 } |
| 1885 |
| 1886 void RenderWidgetHostImpl::DidFlushAllInput() { |
1887 if (synthetic_gesture_controller_) | 1887 if (synthetic_gesture_controller_) |
1888 synthetic_gesture_controller_->OnDidFlushInput(); | 1888 synthetic_gesture_controller_->OnDidFlushAllInput(); |
1889 } | 1889 } |
1890 | 1890 |
1891 void RenderWidgetHostImpl::DidOverscroll(const DidOverscrollParams& params) { | 1891 void RenderWidgetHostImpl::DidOverscroll(const DidOverscrollParams& params) { |
1892 if (view_) | 1892 if (view_) |
1893 view_->DidOverscroll(params); | 1893 view_->DidOverscroll(params); |
1894 } | 1894 } |
1895 | 1895 |
1896 void RenderWidgetHostImpl::DidStopFlinging() { | 1896 void RenderWidgetHostImpl::DidStopFlinging() { |
1897 if (view_) | 1897 if (view_) |
1898 view_->DidStopFlinging(); | 1898 view_->DidStopFlinging(); |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2186 } | 2186 } |
2187 | 2187 |
2188 #if defined(OS_WIN) | 2188 #if defined(OS_WIN) |
2189 gfx::NativeViewAccessible | 2189 gfx::NativeViewAccessible |
2190 RenderWidgetHostImpl::GetParentNativeViewAccessible() { | 2190 RenderWidgetHostImpl::GetParentNativeViewAccessible() { |
2191 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; | 2191 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; |
2192 } | 2192 } |
2193 #endif | 2193 #endif |
2194 | 2194 |
2195 } // namespace content | 2195 } // namespace content |
OLD | NEW |