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 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
857 // Send out a request to the renderer to paint the view if required. | 857 // Send out a request to the renderer to paint the view if required. |
858 repaint_start_time_ = TimeTicks::Now(); | 858 repaint_start_time_ = TimeTicks::Now(); |
859 repaint_ack_pending_ = true; | 859 repaint_ack_pending_ = true; |
860 TRACE_EVENT_ASYNC_BEGIN0( | 860 TRACE_EVENT_ASYNC_BEGIN0( |
861 "renderer_host", "RenderWidgetHostImpl::repaint_ack_pending_", this); | 861 "renderer_host", "RenderWidgetHostImpl::repaint_ack_pending_", this); |
862 Send(new ViewMsg_Repaint(routing_id_, current_size_)); | 862 Send(new ViewMsg_Repaint(routing_id_, current_size_)); |
863 return true; | 863 return true; |
864 } | 864 } |
865 | 865 |
866 void RenderWidgetHostImpl::StartHangMonitorTimeout(base::TimeDelta delay) { | 866 void RenderWidgetHostImpl::StartHangMonitorTimeout(base::TimeDelta delay) { |
867 if (is_hidden_) | |
868 return; | |
piman
2015/02/19 23:43:52
Do we need to restart it when we go visible (i.e.
jdduke (slow)
2015/02/23 16:03:26
Good question, and I don't really have the answer.
| |
867 if (hang_monitor_timeout_) | 869 if (hang_monitor_timeout_) |
868 hang_monitor_timeout_->Start(delay); | 870 hang_monitor_timeout_->Start(delay); |
869 } | 871 } |
870 | 872 |
871 void RenderWidgetHostImpl::RestartHangMonitorTimeout() { | 873 void RenderWidgetHostImpl::RestartHangMonitorTimeout() { |
874 if (is_hidden_) | |
875 return; | |
872 if (hang_monitor_timeout_) | 876 if (hang_monitor_timeout_) |
873 hang_monitor_timeout_->Restart( | 877 hang_monitor_timeout_->Restart( |
874 base::TimeDelta::FromMilliseconds(hung_renderer_delay_ms_)); | 878 base::TimeDelta::FromMilliseconds(hung_renderer_delay_ms_)); |
875 } | 879 } |
876 | 880 |
877 void RenderWidgetHostImpl::StopHangMonitorTimeout() { | 881 void RenderWidgetHostImpl::StopHangMonitorTimeout() { |
878 if (hang_monitor_timeout_) | 882 if (hang_monitor_timeout_) |
879 hang_monitor_timeout_->Stop(); | 883 hang_monitor_timeout_->Stop(); |
880 RendererIsResponsive(); | 884 RendererIsResponsive(); |
881 } | 885 } |
(...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2197 } | 2201 } |
2198 #endif | 2202 #endif |
2199 | 2203 |
2200 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { | 2204 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { |
2201 if (view_) | 2205 if (view_) |
2202 return view_->PreferredReadbackFormat(); | 2206 return view_->PreferredReadbackFormat(); |
2203 return kN32_SkColorType; | 2207 return kN32_SkColorType; |
2204 } | 2208 } |
2205 | 2209 |
2206 } // namespace content | 2210 } // namespace content |
OLD | NEW |