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 <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1707 } | 1707 } |
1708 | 1708 |
1709 if (!was_async) { | 1709 if (!was_async) { |
1710 DidUpdateBackingStore(params, paint_start); | 1710 DidUpdateBackingStore(params, paint_start); |
1711 } | 1711 } |
1712 | 1712 |
1713 if (should_auto_resize_) { | 1713 if (should_auto_resize_) { |
1714 bool post_callback = new_auto_size_.IsEmpty(); | 1714 bool post_callback = new_auto_size_.IsEmpty(); |
1715 new_auto_size_ = params.view_size; | 1715 new_auto_size_ = params.view_size; |
1716 if (post_callback) { | 1716 if (post_callback) { |
1717 MessageLoop::current()->PostTask( | 1717 base::MessageLoop::current()->PostTask( |
1718 FROM_HERE, | 1718 FROM_HERE, |
1719 base::Bind(&RenderWidgetHostImpl::DelayedAutoResized, | 1719 base::Bind(&RenderWidgetHostImpl::DelayedAutoResized, |
1720 weak_factory_.GetWeakPtr())); | 1720 weak_factory_.GetWeakPtr())); |
1721 } | 1721 } |
1722 } | 1722 } |
1723 | 1723 |
1724 // Log the time delta for processing a paint message. On platforms that don't | 1724 // Log the time delta for processing a paint message. On platforms that don't |
1725 // support asynchronous painting, this is equivalent to | 1725 // support asynchronous painting, this is equivalent to |
1726 // MPArch.RWH_TotalPaintTime. | 1726 // MPArch.RWH_TotalPaintTime. |
1727 TimeDelta delta = TimeTicks::Now() - paint_start; | 1727 TimeDelta delta = TimeTicks::Now() - paint_start; |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2395 return; | 2395 return; |
2396 | 2396 |
2397 OnRenderAutoResized(new_size); | 2397 OnRenderAutoResized(new_size); |
2398 } | 2398 } |
2399 | 2399 |
2400 void RenderWidgetHostImpl::DetachDelegate() { | 2400 void RenderWidgetHostImpl::DetachDelegate() { |
2401 delegate_ = NULL; | 2401 delegate_ = NULL; |
2402 } | 2402 } |
2403 | 2403 |
2404 } // namespace content | 2404 } // namespace content |
OLD | NEW |