OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/render_widget_host.h" | 5 #include "chrome/browser/renderer_host/render_widget_host.h" |
6 | 6 |
7 #include "app/keyboard_codes.h" | 7 #include "app/keyboard_codes.h" |
8 #include "base/auto_reset.h" | 8 #include "base/auto_reset.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 TransportDIB::Handle transport_dib) { | 1049 TransportDIB::Handle transport_dib) { |
1050 if (view_) { | 1050 if (view_) { |
1051 view_->AcceleratedSurfaceSetTransportDIB(window, width, height, | 1051 view_->AcceleratedSurfaceSetTransportDIB(window, width, height, |
1052 transport_dib); | 1052 transport_dib); |
1053 } | 1053 } |
1054 } | 1054 } |
1055 | 1055 |
1056 void RenderWidgetHost::OnAcceleratedSurfaceBuffersSwapped( | 1056 void RenderWidgetHost::OnAcceleratedSurfaceBuffersSwapped( |
1057 gfx::PluginWindowHandle window, uint64 surface_id) { | 1057 gfx::PluginWindowHandle window, uint64 surface_id) { |
1058 if (view_) { | 1058 if (view_) { |
1059 view_->AcceleratedSurfaceBuffersSwapped(window, surface_id); | 1059 // This code path could be updated to implement flow control for |
| 1060 // updating of accelerated plugins as well. However, if we add support |
| 1061 // for composited plugins then this is not necessary. |
| 1062 view_->AcceleratedSurfaceBuffersSwapped(window, surface_id, |
| 1063 0, 0, 0); |
1060 } | 1064 } |
1061 } | 1065 } |
1062 #elif defined(OS_POSIX) | 1066 #elif defined(OS_POSIX) |
1063 | 1067 |
1064 void RenderWidgetHost::OnMsgCreatePluginContainer(gfx::PluginWindowHandle id) { | 1068 void RenderWidgetHost::OnMsgCreatePluginContainer(gfx::PluginWindowHandle id) { |
1065 // TODO(piman): view_ can only be NULL with delayed view creation in | 1069 // TODO(piman): view_ can only be NULL with delayed view creation in |
1066 // extensions (see ExtensionHost::CreateRenderViewSoon). Figure out how to | 1070 // extensions (see ExtensionHost::CreateRenderViewSoon). Figure out how to |
1067 // support plugins in that case. | 1071 // support plugins in that case. |
1068 if (view_) { | 1072 if (view_) { |
1069 view_->CreatePluginContainer(id); | 1073 view_->CreatePluginContainer(id); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1197 // of this key event. | 1201 // of this key event. |
1198 if (!processed && !is_hidden_ && !front_item.skip_in_browser) { | 1202 if (!processed && !is_hidden_ && !front_item.skip_in_browser) { |
1199 UnhandledKeyboardEvent(front_item); | 1203 UnhandledKeyboardEvent(front_item); |
1200 | 1204 |
1201 // WARNING: This RenderWidgetHost can be deallocated at this point | 1205 // WARNING: This RenderWidgetHost can be deallocated at this point |
1202 // (i.e. in the case of Ctrl+W, where the call to | 1206 // (i.e. in the case of Ctrl+W, where the call to |
1203 // UnhandledKeyboardEvent destroys this RenderWidgetHost). | 1207 // UnhandledKeyboardEvent destroys this RenderWidgetHost). |
1204 } | 1208 } |
1205 } | 1209 } |
1206 } | 1210 } |
OLD | NEW |