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 1810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1821 } | 1821 } |
1822 | 1822 |
1823 // static | 1823 // static |
1824 void RenderWidgetHostImpl::AcknowledgePostSubBuffer(int32 route_id, | 1824 void RenderWidgetHostImpl::AcknowledgePostSubBuffer(int32 route_id, |
1825 int gpu_host_id) { | 1825 int gpu_host_id) { |
1826 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); | 1826 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); |
1827 if (ui_shim) | 1827 if (ui_shim) |
1828 ui_shim->Send(new AcceleratedSurfaceMsg_PostSubBufferACK(route_id)); | 1828 ui_shim->Send(new AcceleratedSurfaceMsg_PostSubBufferACK(route_id)); |
1829 } | 1829 } |
1830 | 1830 |
| 1831 #if defined(USE_AURA) |
| 1832 // static |
| 1833 void RenderWidgetHostImpl::SendFrontSurfaceIsProtected( |
| 1834 bool is_protected, |
| 1835 uint32 visibility_state_id, |
| 1836 int32 route_id, |
| 1837 int gpu_host_id) { |
| 1838 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); |
| 1839 if (ui_shim) |
| 1840 ui_shim->Send(new AcceleratedSurfaceMsg_SetFrontSurfaceIsProtected( |
| 1841 route_id, is_protected, visibility_state_id)); |
| 1842 } |
| 1843 #endif |
| 1844 |
1831 void RenderWidgetHostImpl::DelayedAutoResized() { | 1845 void RenderWidgetHostImpl::DelayedAutoResized() { |
1832 gfx::Size new_size = new_auto_size_; | 1846 gfx::Size new_size = new_auto_size_; |
1833 // Clear the new_auto_size_ since the empty value is used as a flag to | 1847 // Clear the new_auto_size_ since the empty value is used as a flag to |
1834 // indicate that no callback is in progress (i.e. without this line | 1848 // indicate that no callback is in progress (i.e. without this line |
1835 // DelayedAutoResized will not get called again). | 1849 // DelayedAutoResized will not get called again). |
1836 new_auto_size_.SetSize(0, 0); | 1850 new_auto_size_.SetSize(0, 0); |
1837 if (!should_auto_resize_) | 1851 if (!should_auto_resize_) |
1838 return; | 1852 return; |
1839 | 1853 |
1840 OnRenderAutoResized(new_size); | 1854 OnRenderAutoResized(new_size); |
1841 } | 1855 } |
1842 | 1856 |
1843 } // namespace content | 1857 } // namespace content |
OLD | NEW |