| 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 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <tuple> | 10 #include <tuple> |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 process_->AddRoute(routing_id_, this); | 226 process_->AddRoute(routing_id_, this); |
| 227 | 227 |
| 228 // If we're initially visible, tell the process host that we're alive. | 228 // If we're initially visible, tell the process host that we're alive. |
| 229 // Otherwise we'll notify the process host when we are first shown. | 229 // Otherwise we'll notify the process host when we are first shown. |
| 230 if (!hidden) | 230 if (!hidden) |
| 231 process_->WidgetRestored(); | 231 process_->WidgetRestored(); |
| 232 | 232 |
| 233 latency_tracker_.Initialize(routing_id_, GetProcess()->GetID()); | 233 latency_tracker_.Initialize(routing_id_, GetProcess()->GetID()); |
| 234 | 234 |
| 235 input_router_.reset(new InputRouterImpl( | 235 input_router_.reset(new InputRouterImpl( |
| 236 process_->GetImmediateSender(), this, this, routing_id_, | 236 process_, this, this, routing_id_, GetInputRouterConfigForPlatform())); |
| 237 GetInputRouterConfigForPlatform())); | |
| 238 | 237 |
| 239 touch_emulator_.reset(); | 238 touch_emulator_.reset(); |
| 240 | 239 |
| 241 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 240 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 242 switches::kDisableHangMonitor)) { | 241 switches::kDisableHangMonitor)) { |
| 243 hang_monitor_timeout_.reset(new TimeoutMonitor( | 242 hang_monitor_timeout_.reset(new TimeoutMonitor( |
| 244 base::Bind(&RenderWidgetHostImpl::RendererIsUnresponsive, | 243 base::Bind(&RenderWidgetHostImpl::RendererIsUnresponsive, |
| 245 weak_factory_.GetWeakPtr()))); | 244 weak_factory_.GetWeakPtr()))); |
| 246 } | 245 } |
| 247 | 246 |
| (...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1374 if (view_) { | 1373 if (view_) { |
| 1375 view_->RenderProcessGone(status, exit_code); | 1374 view_->RenderProcessGone(status, exit_code); |
| 1376 view_.reset(); // The View should be deleted by RenderProcessGone. | 1375 view_.reset(); // The View should be deleted by RenderProcessGone. |
| 1377 } | 1376 } |
| 1378 | 1377 |
| 1379 // Reconstruct the input router to ensure that it has fresh state for a new | 1378 // Reconstruct the input router to ensure that it has fresh state for a new |
| 1380 // renderer. Otherwise it may be stuck waiting for the old renderer to ack an | 1379 // renderer. Otherwise it may be stuck waiting for the old renderer to ack an |
| 1381 // event. (In particular, the above call to view_->RenderProcessGone will | 1380 // event. (In particular, the above call to view_->RenderProcessGone will |
| 1382 // destroy the aura window, which may dispatch a synthetic mouse move.) | 1381 // destroy the aura window, which may dispatch a synthetic mouse move.) |
| 1383 input_router_.reset(new InputRouterImpl( | 1382 input_router_.reset(new InputRouterImpl( |
| 1384 process_->GetImmediateSender(), this, this, routing_id_, | 1383 process_, this, this, routing_id_, GetInputRouterConfigForPlatform())); |
| 1385 GetInputRouterConfigForPlatform())); | |
| 1386 | 1384 |
| 1387 synthetic_gesture_controller_.reset(); | 1385 synthetic_gesture_controller_.reset(); |
| 1388 } | 1386 } |
| 1389 | 1387 |
| 1390 void RenderWidgetHostImpl::UpdateTextDirection(WebTextDirection direction) { | 1388 void RenderWidgetHostImpl::UpdateTextDirection(WebTextDirection direction) { |
| 1391 text_direction_updated_ = true; | 1389 text_direction_updated_ = true; |
| 1392 text_direction_ = direction; | 1390 text_direction_ = direction; |
| 1393 } | 1391 } |
| 1394 | 1392 |
| 1395 void RenderWidgetHostImpl::CancelUpdateTextDirection() { | 1393 void RenderWidgetHostImpl::CancelUpdateTextDirection() { |
| (...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2202 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; | 2200 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; |
| 2203 } | 2201 } |
| 2204 | 2202 |
| 2205 BrowserAccessibilityManager* | 2203 BrowserAccessibilityManager* |
| 2206 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { | 2204 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { |
| 2207 return delegate_ ? | 2205 return delegate_ ? |
| 2208 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; | 2206 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; |
| 2209 } | 2207 } |
| 2210 | 2208 |
| 2211 } // namespace content | 2209 } // namespace content |
| OLD | NEW |