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

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

Issue 1991323002: Send input event IPCs directly from the UI thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 8
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 process_->AddRoute(routing_id_, this); 223 process_->AddRoute(routing_id_, this);
224 224
225 // If we're initially visible, tell the process host that we're alive. 225 // If we're initially visible, tell the process host that we're alive.
226 // Otherwise we'll notify the process host when we are first shown. 226 // Otherwise we'll notify the process host when we are first shown.
227 if (!hidden) 227 if (!hidden)
228 process_->WidgetRestored(); 228 process_->WidgetRestored();
229 229
230 latency_tracker_.Initialize(routing_id_, GetProcess()->GetID()); 230 latency_tracker_.Initialize(routing_id_, GetProcess()->GetID());
231 231
232 input_router_.reset(new InputRouterImpl( 232 input_router_.reset(new InputRouterImpl(
233 process_, this, this, routing_id_, GetInputRouterConfigForPlatform())); 233 process_->GetImmediateSender(), this, this, routing_id_,
234 GetInputRouterConfigForPlatform()));
234 235
235 touch_emulator_.reset(); 236 touch_emulator_.reset();
236 237
237 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 238 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
238 switches::kDisableHangMonitor)) { 239 switches::kDisableHangMonitor)) {
239 hang_monitor_timeout_.reset(new TimeoutMonitor( 240 hang_monitor_timeout_.reset(new TimeoutMonitor(
240 base::Bind(&RenderWidgetHostImpl::RendererIsUnresponsive, 241 base::Bind(&RenderWidgetHostImpl::RendererIsUnresponsive,
241 weak_factory_.GetWeakPtr()))); 242 weak_factory_.GetWeakPtr())));
242 } 243 }
243 244
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 if (view_) { 1335 if (view_) {
1335 view_->RenderProcessGone(status, exit_code); 1336 view_->RenderProcessGone(status, exit_code);
1336 view_.reset(); // The View should be deleted by RenderProcessGone. 1337 view_.reset(); // The View should be deleted by RenderProcessGone.
1337 } 1338 }
1338 1339
1339 // Reconstruct the input router to ensure that it has fresh state for a new 1340 // Reconstruct the input router to ensure that it has fresh state for a new
1340 // renderer. Otherwise it may be stuck waiting for the old renderer to ack an 1341 // renderer. Otherwise it may be stuck waiting for the old renderer to ack an
1341 // event. (In particular, the above call to view_->RenderProcessGone will 1342 // event. (In particular, the above call to view_->RenderProcessGone will
1342 // destroy the aura window, which may dispatch a synthetic mouse move.) 1343 // destroy the aura window, which may dispatch a synthetic mouse move.)
1343 input_router_.reset(new InputRouterImpl( 1344 input_router_.reset(new InputRouterImpl(
1344 process_, this, this, routing_id_, GetInputRouterConfigForPlatform())); 1345 process_->GetImmediateSender(), this, this, routing_id_,
1346 GetInputRouterConfigForPlatform()));
1345 1347
1346 synthetic_gesture_controller_.reset(); 1348 synthetic_gesture_controller_.reset();
1347 } 1349 }
1348 1350
1349 void RenderWidgetHostImpl::UpdateTextDirection(WebTextDirection direction) { 1351 void RenderWidgetHostImpl::UpdateTextDirection(WebTextDirection direction) {
1350 text_direction_updated_ = true; 1352 text_direction_updated_ = true;
1351 text_direction_ = direction; 1353 text_direction_ = direction;
1352 } 1354 }
1353 1355
1354 void RenderWidgetHostImpl::CancelUpdateTextDirection() { 1356 void RenderWidgetHostImpl::CancelUpdateTextDirection() {
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
2151 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; 2153 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL;
2152 } 2154 }
2153 2155
2154 BrowserAccessibilityManager* 2156 BrowserAccessibilityManager*
2155 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { 2157 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() {
2156 return delegate_ ? 2158 return delegate_ ?
2157 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; 2159 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL;
2158 } 2160 }
2159 2161
2160 } // namespace content 2162 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698