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 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1771 } | 1771 } |
1772 | 1772 |
1773 // static | 1773 // static |
1774 void RenderWidgetHostImpl::AcknowledgePostSubBuffer(int32 route_id, | 1774 void RenderWidgetHostImpl::AcknowledgePostSubBuffer(int32 route_id, |
1775 int gpu_host_id) { | 1775 int gpu_host_id) { |
1776 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); | 1776 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); |
1777 if (ui_shim) | 1777 if (ui_shim) |
1778 ui_shim->Send(new AcceleratedSurfaceMsg_PostSubBufferACK(route_id)); | 1778 ui_shim->Send(new AcceleratedSurfaceMsg_PostSubBufferACK(route_id)); |
1779 } | 1779 } |
1780 | 1780 |
| 1781 #if defined(USE_AURA) |
| 1782 // static |
| 1783 void RenderWidgetHostImpl::AcknowledgeRequestReleaseFront( |
| 1784 int request_id, |
| 1785 int retry_count, |
| 1786 bool was_released, |
| 1787 int32 route_id, |
| 1788 int gpu_host_id) { |
| 1789 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); |
| 1790 if (ui_shim) |
| 1791 ui_shim->Send(new AcceleratedSurfaceMsg_RequestReleaseFrontACK( |
| 1792 route_id, request_id, retry_count, was_released)); |
| 1793 } |
| 1794 |
| 1795 // static |
| 1796 void RenderWidgetHostImpl::SendFrontSurfaceIsProtected( |
| 1797 bool is_protected, int32 route_id, int gpu_host_id) { |
| 1798 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); |
| 1799 if (ui_shim) |
| 1800 ui_shim->Send(new AcceleratedSurfaceMsg_SetFrontSurfaceIsProtected( |
| 1801 route_id, is_protected)); |
| 1802 } |
| 1803 #endif |
| 1804 |
1781 void RenderWidgetHostImpl::DelayedAutoResized() { | 1805 void RenderWidgetHostImpl::DelayedAutoResized() { |
1782 gfx::Size new_size = new_auto_size_; | 1806 gfx::Size new_size = new_auto_size_; |
1783 // Clear the new_auto_size_ since the empty value is used as a flag to | 1807 // Clear the new_auto_size_ since the empty value is used as a flag to |
1784 // indicate that no callback is in progress (i.e. without this line | 1808 // indicate that no callback is in progress (i.e. without this line |
1785 // DelayedAutoResized will not get called again). | 1809 // DelayedAutoResized will not get called again). |
1786 new_auto_size_.SetSize(0, 0); | 1810 new_auto_size_.SetSize(0, 0); |
1787 if (!should_auto_resize_) | 1811 if (!should_auto_resize_) |
1788 return; | 1812 return; |
1789 | 1813 |
1790 OnRenderAutoResized(new_size); | 1814 OnRenderAutoResized(new_size); |
1791 } | 1815 } |
1792 | 1816 |
1793 } // namespace content | 1817 } // namespace content |
OLD | NEW |