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

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, 6 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 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 if (view_) { 1340 if (view_) {
1340 view_->RenderProcessGone(status, exit_code); 1341 view_->RenderProcessGone(status, exit_code);
1341 view_.reset(); // The View should be deleted by RenderProcessGone. 1342 view_.reset(); // The View should be deleted by RenderProcessGone.
1342 } 1343 }
1343 1344
1344 // Reconstruct the input router to ensure that it has fresh state for a new 1345 // Reconstruct the input router to ensure that it has fresh state for a new
1345 // renderer. Otherwise it may be stuck waiting for the old renderer to ack an 1346 // renderer. Otherwise it may be stuck waiting for the old renderer to ack an
1346 // event. (In particular, the above call to view_->RenderProcessGone will 1347 // event. (In particular, the above call to view_->RenderProcessGone will
1347 // destroy the aura window, which may dispatch a synthetic mouse move.) 1348 // destroy the aura window, which may dispatch a synthetic mouse move.)
1348 input_router_.reset(new InputRouterImpl( 1349 input_router_.reset(new InputRouterImpl(
1349 process_, this, this, routing_id_, GetInputRouterConfigForPlatform())); 1350 process_->GetImmediateSender(), this, this, routing_id_,
1351 GetInputRouterConfigForPlatform()));
1350 1352
1351 synthetic_gesture_controller_.reset(); 1353 synthetic_gesture_controller_.reset();
1352 } 1354 }
1353 1355
1354 void RenderWidgetHostImpl::UpdateTextDirection(WebTextDirection direction) { 1356 void RenderWidgetHostImpl::UpdateTextDirection(WebTextDirection direction) {
1355 text_direction_updated_ = true; 1357 text_direction_updated_ = true;
1356 text_direction_ = direction; 1358 text_direction_ = direction;
1357 } 1359 }
1358 1360
1359 void RenderWidgetHostImpl::CancelUpdateTextDirection() { 1361 void RenderWidgetHostImpl::CancelUpdateTextDirection() {
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
2156 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; 2158 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL;
2157 } 2159 }
2158 2160
2159 BrowserAccessibilityManager* 2161 BrowserAccessibilityManager*
2160 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { 2162 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() {
2161 return delegate_ ? 2163 return delegate_ ?
2162 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; 2164 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL;
2163 } 2165 }
2164 2166
2165 } // namespace content 2167 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/browser/render_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698