OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "content/browser/renderer_host/render_widget_host.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 if (hung_renderer_timer_.IsRunning() && | 475 if (hung_renderer_timer_.IsRunning() && |
476 hung_renderer_timer_.GetCurrentDelay() <= delay && | 476 hung_renderer_timer_.GetCurrentDelay() <= delay && |
477 !time_when_considered_hung_.is_null()) { | 477 !time_when_considered_hung_.is_null()) { |
478 return; | 478 return; |
479 } | 479 } |
480 | 480 |
481 // Either the timer is not yet running, or we need to adjust the timer to | 481 // Either the timer is not yet running, or we need to adjust the timer to |
482 // fire sooner. | 482 // fire sooner. |
483 time_when_considered_hung_ = Time::Now() + delay; | 483 time_when_considered_hung_ = Time::Now() + delay; |
484 hung_renderer_timer_.Stop(); | 484 hung_renderer_timer_.Stop(); |
485 hung_renderer_timer_.Start(delay, this, | 485 hung_renderer_timer_.Start(FROM_HERE, delay, this, |
486 &RenderWidgetHost::CheckRendererIsUnresponsive); | 486 &RenderWidgetHost::CheckRendererIsUnresponsive); |
487 } | 487 } |
488 | 488 |
489 void RenderWidgetHost::RestartHangMonitorTimeout() { | 489 void RenderWidgetHost::RestartHangMonitorTimeout() { |
490 // Setting to null will cause StartHangMonitorTimeout to restart the timer. | 490 // Setting to null will cause StartHangMonitorTimeout to restart the timer. |
491 time_when_considered_hung_ = Time(); | 491 time_when_considered_hung_ = Time(); |
492 StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kHungRendererDelayMs)); | 492 StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kHungRendererDelayMs)); |
493 } | 493 } |
494 | 494 |
495 void RenderWidgetHost::StopHangMonitorTimeout() { | 495 void RenderWidgetHost::StopHangMonitorTimeout() { |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1245 view_->CreatePluginContainer(deferred_plugin_handles_[i]); | 1245 view_->CreatePluginContainer(deferred_plugin_handles_[i]); |
1246 #endif | 1246 #endif |
1247 } | 1247 } |
1248 | 1248 |
1249 deferred_plugin_handles_.clear(); | 1249 deferred_plugin_handles_.clear(); |
1250 } | 1250 } |
1251 | 1251 |
1252 void RenderWidgetHost::StartUserGesture() { | 1252 void RenderWidgetHost::StartUserGesture() { |
1253 OnUserGesture(); | 1253 OnUserGesture(); |
1254 } | 1254 } |
OLD | NEW |