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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 return handled; | 324 return handled; |
325 } | 325 } |
326 | 326 |
327 bool RenderWidgetHostImpl::Send(IPC::Message* msg) { | 327 bool RenderWidgetHostImpl::Send(IPC::Message* msg) { |
328 return process_->Send(msg); | 328 return process_->Send(msg); |
329 } | 329 } |
330 | 330 |
331 void RenderWidgetHostImpl::WasHidden() { | 331 void RenderWidgetHostImpl::WasHidden() { |
332 is_hidden_ = true; | 332 is_hidden_ = true; |
333 | 333 |
334 // Don't bother reporting hung state when we aren't the active tab. | 334 // Don't bother reporting hung state when we aren't active. |
335 StopHangMonitorTimeout(); | 335 StopHangMonitorTimeout(); |
336 | 336 |
337 // If we have a renderer, then inform it that we are being hidden so it can | 337 // If we have a renderer, then inform it that we are being hidden so it can |
338 // reduce its resource utilization. | 338 // reduce its resource utilization. |
339 Send(new ViewMsg_WasHidden(routing_id_)); | 339 Send(new ViewMsg_WasHidden(routing_id_)); |
340 | 340 |
341 // Tell the RenderProcessHost we were hidden. | 341 // Tell the RenderProcessHost we were hidden. |
342 process_->WidgetHidden(); | 342 process_->WidgetHidden(); |
343 | 343 |
344 bool is_visible = false; | 344 bool is_visible = false; |
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1743 // indicate that no callback is in progress (i.e. without this line | 1743 // indicate that no callback is in progress (i.e. without this line |
1744 // DelayedAutoResized will not get called again). | 1744 // DelayedAutoResized will not get called again). |
1745 new_auto_size_.SetSize(0, 0); | 1745 new_auto_size_.SetSize(0, 0); |
1746 if (!should_auto_resize_) | 1746 if (!should_auto_resize_) |
1747 return; | 1747 return; |
1748 | 1748 |
1749 OnRenderAutoResized(new_size); | 1749 OnRenderAutoResized(new_size); |
1750 } | 1750 } |
1751 | 1751 |
1752 } // namespace content | 1752 } // namespace content |
OLD | NEW |