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 2122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2133 if (ui_shim) | 2133 if (ui_shim) |
2134 ui_shim->Send(new AcceleratedSurfaceMsg_BufferPresented(route_id, | 2134 ui_shim->Send(new AcceleratedSurfaceMsg_BufferPresented(route_id, |
2135 sync_point)); | 2135 sync_point)); |
2136 } | 2136 } |
2137 | 2137 |
2138 void RenderWidgetHostImpl::AcknowledgeSwapBuffersToRenderer() { | 2138 void RenderWidgetHostImpl::AcknowledgeSwapBuffersToRenderer() { |
2139 if (!is_threaded_compositing_enabled_) | 2139 if (!is_threaded_compositing_enabled_) |
2140 Send(new ViewMsg_SwapBuffers_ACK(routing_id_)); | 2140 Send(new ViewMsg_SwapBuffers_ACK(routing_id_)); |
2141 } | 2141 } |
2142 | 2142 |
2143 #if defined(USE_AURA) | |
2144 // static | |
2145 void RenderWidgetHostImpl::SendFrontSurfaceIsProtected( | |
2146 bool is_protected, | |
2147 uint32 protection_state_id, | |
2148 int32 route_id, | |
2149 int gpu_host_id) { | |
2150 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); | |
2151 if (ui_shim) { | |
2152 ui_shim->Send(new AcceleratedSurfaceMsg_SetFrontSurfaceIsProtected( | |
2153 route_id, is_protected, protection_state_id)); | |
2154 } | |
2155 } | |
2156 #endif | |
2157 | |
2158 void RenderWidgetHostImpl::DelayedAutoResized() { | 2143 void RenderWidgetHostImpl::DelayedAutoResized() { |
2159 gfx::Size new_size = new_auto_size_; | 2144 gfx::Size new_size = new_auto_size_; |
2160 // Clear the new_auto_size_ since the empty value is used as a flag to | 2145 // Clear the new_auto_size_ since the empty value is used as a flag to |
2161 // indicate that no callback is in progress (i.e. without this line | 2146 // indicate that no callback is in progress (i.e. without this line |
2162 // DelayedAutoResized will not get called again). | 2147 // DelayedAutoResized will not get called again). |
2163 new_auto_size_.SetSize(0, 0); | 2148 new_auto_size_.SetSize(0, 0); |
2164 if (!should_auto_resize_) | 2149 if (!should_auto_resize_) |
2165 return; | 2150 return; |
2166 | 2151 |
2167 OnRenderAutoResized(new_size); | 2152 OnRenderAutoResized(new_size); |
2168 } | 2153 } |
2169 | 2154 |
2170 void RenderWidgetHostImpl::DetachDelegate() { | 2155 void RenderWidgetHostImpl::DetachDelegate() { |
2171 delegate_ = NULL; | 2156 delegate_ = NULL; |
2172 } | 2157 } |
2173 | 2158 |
2174 } // namespace content | 2159 } // namespace content |
OLD | NEW |