Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(530)

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 20356003: Provided batched input delivery with a BufferedInputRouter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: BufferedInputRouter unit tests Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 10 matching lines...) Expand all
21 #include "base/strings/utf_string_conversions.h" 21 #include "base/strings/utf_string_conversions.h"
22 #include "cc/output/compositor_frame.h" 22 #include "cc/output/compositor_frame.h"
23 #include "cc/output/compositor_frame_ack.h" 23 #include "cc/output/compositor_frame_ack.h"
24 #include "content/browser/accessibility/browser_accessibility_state_impl.h" 24 #include "content/browser/accessibility/browser_accessibility_state_impl.h"
25 #include "content/browser/gpu/gpu_process_host.h" 25 #include "content/browser/gpu/gpu_process_host.h"
26 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 26 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
27 #include "content/browser/gpu/gpu_surface_tracker.h" 27 #include "content/browser/gpu/gpu_surface_tracker.h"
28 #include "content/browser/renderer_host/backing_store.h" 28 #include "content/browser/renderer_host/backing_store.h"
29 #include "content/browser/renderer_host/backing_store_manager.h" 29 #include "content/browser/renderer_host/backing_store_manager.h"
30 #include "content/browser/renderer_host/dip_util.h" 30 #include "content/browser/renderer_host/dip_util.h"
31 #include "content/browser/renderer_host/input/buffered_input_router.h"
31 #include "content/browser/renderer_host/input/immediate_input_router.h" 32 #include "content/browser/renderer_host/input/immediate_input_router.h"
32 #include "content/browser/renderer_host/overscroll_controller.h" 33 #include "content/browser/renderer_host/overscroll_controller.h"
33 #include "content/browser/renderer_host/render_process_host_impl.h" 34 #include "content/browser/renderer_host/render_process_host_impl.h"
34 #include "content/browser/renderer_host/render_view_host_impl.h" 35 #include "content/browser/renderer_host/render_view_host_impl.h"
35 #include "content/browser/renderer_host/render_widget_helper.h" 36 #include "content/browser/renderer_host/render_widget_helper.h"
36 #include "content/browser/renderer_host/render_widget_host_delegate.h" 37 #include "content/browser/renderer_host/render_widget_host_delegate.h"
37 #include "content/common/accessibility_messages.h" 38 #include "content/common/accessibility_messages.h"
38 #include "content/common/content_constants_internal.h" 39 #include "content/common/content_constants_internal.h"
39 #include "content/common/gpu/gpu_messages.h" 40 #include "content/common/gpu/gpu_messages.h"
40 #include "content/common/input_messages.h" 41 #include "content/common/input_messages.h"
(...skipping 2079 matching lines...) Expand 10 before | Expand all | Expand 10 after
2120 2121
2121 void RenderWidgetHostImpl::OnUnexpectedEventAck(bool bad_message) { 2122 void RenderWidgetHostImpl::OnUnexpectedEventAck(bool bad_message) {
2122 if (bad_message) { 2123 if (bad_message) {
2123 RecordAction(UserMetricsAction("BadMessageTerminate_RWH2")); 2124 RecordAction(UserMetricsAction("BadMessageTerminate_RWH2"));
2124 process_->ReceivedBadMessage(); 2125 process_->ReceivedBadMessage();
2125 } 2126 }
2126 2127
2127 suppress_next_char_events_ = false; 2128 suppress_next_char_events_ = false;
2128 } 2129 }
2129 2130
2131 void RenderWidgetHostImpl::SetNeedsFlush() {
2132 }
2133
2134 void RenderWidgetHostImpl::DidFlush() {
2135 }
2136
2130 const gfx::Vector2d& RenderWidgetHostImpl::GetLastScrollOffset() const { 2137 const gfx::Vector2d& RenderWidgetHostImpl::GetLastScrollOffset() const {
2131 return last_scroll_offset_; 2138 return last_scroll_offset_;
2132 } 2139 }
2133 2140
2134 bool RenderWidgetHostImpl::IgnoreInputEvents() const { 2141 bool RenderWidgetHostImpl::IgnoreInputEvents() const {
2135 return ignore_input_events_ || process_->IgnoreInputEvents(); 2142 return ignore_input_events_ || process_->IgnoreInputEvents();
2136 } 2143 }
2137 2144
2138 bool RenderWidgetHostImpl::ShouldForwardTouchEvent() const { 2145 bool RenderWidgetHostImpl::ShouldForwardTouchEvent() const {
2139 return input_router_->ShouldForwardTouchEvent(); 2146 return input_router_->ShouldForwardTouchEvent();
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
2476 int process_id = (b->first.second >> 32) & 0xffffffff; 2483 int process_id = (b->first.second >> 32) & 0xffffffff;
2477 RenderWidgetHost* rwh = 2484 RenderWidgetHost* rwh =
2478 RenderWidgetHost::FromID(process_id, routing_id); 2485 RenderWidgetHost::FromID(process_id, routing_id);
2479 if (!rwh) 2486 if (!rwh)
2480 continue; 2487 continue;
2481 RenderWidgetHostImpl::From(rwh)->FrameSwapped(latency_info); 2488 RenderWidgetHostImpl::From(rwh)->FrameSwapped(latency_info);
2482 } 2489 }
2483 } 2490 }
2484 2491
2485 } // namespace content 2492 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698