OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "content/browser/renderer_host/render_widget_host.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 OnAllocateFakePluginWindowHandle) | 197 OnAllocateFakePluginWindowHandle) |
198 IPC_MESSAGE_HANDLER(ViewHostMsg_DestroyFakePluginWindowHandle, | 198 IPC_MESSAGE_HANDLER(ViewHostMsg_DestroyFakePluginWindowHandle, |
199 OnDestroyFakePluginWindowHandle) | 199 OnDestroyFakePluginWindowHandle) |
200 IPC_MESSAGE_HANDLER(ViewHostMsg_AcceleratedSurfaceSetIOSurface, | 200 IPC_MESSAGE_HANDLER(ViewHostMsg_AcceleratedSurfaceSetIOSurface, |
201 OnAcceleratedSurfaceSetIOSurface) | 201 OnAcceleratedSurfaceSetIOSurface) |
202 IPC_MESSAGE_HANDLER(ViewHostMsg_AcceleratedSurfaceSetTransportDIB, | 202 IPC_MESSAGE_HANDLER(ViewHostMsg_AcceleratedSurfaceSetTransportDIB, |
203 OnAcceleratedSurfaceSetTransportDIB) | 203 OnAcceleratedSurfaceSetTransportDIB) |
204 IPC_MESSAGE_HANDLER(ViewHostMsg_AcceleratedSurfaceBuffersSwapped, | 204 IPC_MESSAGE_HANDLER(ViewHostMsg_AcceleratedSurfaceBuffersSwapped, |
205 OnAcceleratedSurfaceBuffersSwapped) | 205 OnAcceleratedSurfaceBuffersSwapped) |
206 #endif | 206 #endif |
207 #if defined(TOOLKIT_USES_GTK) | 207 #if defined(TOOLKIT_USES_GTK) && !defined(USE_AURA) |
208 IPC_MESSAGE_HANDLER(ViewHostMsg_CreatePluginContainer, | 208 IPC_MESSAGE_HANDLER(ViewHostMsg_CreatePluginContainer, |
209 OnMsgCreatePluginContainer) | 209 OnMsgCreatePluginContainer) |
210 IPC_MESSAGE_HANDLER(ViewHostMsg_DestroyPluginContainer, | 210 IPC_MESSAGE_HANDLER(ViewHostMsg_DestroyPluginContainer, |
211 OnMsgDestroyPluginContainer) | 211 OnMsgDestroyPluginContainer) |
212 #endif | 212 #endif |
213 IPC_MESSAGE_UNHANDLED(handled = false) | 213 IPC_MESSAGE_UNHANDLED(handled = false) |
214 IPC_END_MESSAGE_MAP_EX() | 214 IPC_END_MESSAGE_MAP_EX() |
215 | 215 |
216 if (!msg_is_ok) { | 216 if (!msg_is_ok) { |
217 // The message de-serialization failed. Kill the renderer process. | 217 // The message de-serialization failed. Kill the renderer process. |
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 #if defined(OS_MACOSX) | 1098 #if defined(OS_MACOSX) |
1099 bool old_state = is_accelerated_compositing_active_; | 1099 bool old_state = is_accelerated_compositing_active_; |
1100 #endif | 1100 #endif |
1101 is_accelerated_compositing_active_ = activated; | 1101 is_accelerated_compositing_active_ = activated; |
1102 #if defined(OS_MACOSX) | 1102 #if defined(OS_MACOSX) |
1103 if (old_state != is_accelerated_compositing_active_ && view_) | 1103 if (old_state != is_accelerated_compositing_active_ && view_) |
1104 view_->GpuRenderingStateDidChange(); | 1104 view_->GpuRenderingStateDidChange(); |
1105 #elif defined(OS_WIN) | 1105 #elif defined(OS_WIN) |
1106 if (view_) | 1106 if (view_) |
1107 view_->ShowCompositorHostWindow(is_accelerated_compositing_active_); | 1107 view_->ShowCompositorHostWindow(is_accelerated_compositing_active_); |
1108 #elif defined(TOOLKIT_USES_GTK) | 1108 #elif defined(TOOLKIT_USES_GTK) && !defined(USE_AURA) |
1109 if (view_) | 1109 if (view_) |
1110 view_->AcceleratedCompositingActivated(activated); | 1110 view_->AcceleratedCompositingActivated(activated); |
1111 #endif | 1111 #endif |
1112 } | 1112 } |
1113 | 1113 |
1114 #if defined(OS_POSIX) | 1114 #if defined(OS_POSIX) |
1115 void RenderWidgetHost::OnMsgGetScreenInfo(gfx::NativeViewId window_id, | 1115 void RenderWidgetHost::OnMsgGetScreenInfo(gfx::NativeViewId window_id, |
1116 WebKit::WebScreenInfo* results) { | 1116 WebKit::WebScreenInfo* results) { |
1117 if (view_) | 1117 if (view_) |
1118 view_->GetScreenInfo(results); | 1118 view_->GetScreenInfo(results); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1230 UnhandledKeyboardEvent(front_item); | 1230 UnhandledKeyboardEvent(front_item); |
1231 | 1231 |
1232 // WARNING: This RenderWidgetHost can be deallocated at this point | 1232 // WARNING: This RenderWidgetHost can be deallocated at this point |
1233 // (i.e. in the case of Ctrl+W, where the call to | 1233 // (i.e. in the case of Ctrl+W, where the call to |
1234 // UnhandledKeyboardEvent destroys this RenderWidgetHost). | 1234 // UnhandledKeyboardEvent destroys this RenderWidgetHost). |
1235 } | 1235 } |
1236 } | 1236 } |
1237 } | 1237 } |
1238 | 1238 |
1239 void RenderWidgetHost::ActivateDeferredPluginHandles() { | 1239 void RenderWidgetHost::ActivateDeferredPluginHandles() { |
| 1240 #if !defined(USE_AURA) |
1240 if (view_ == NULL) | 1241 if (view_ == NULL) |
1241 return; | 1242 return; |
1242 | 1243 |
1243 for (int i = 0; i < static_cast<int>(deferred_plugin_handles_.size()); i++) { | 1244 for (int i = 0; i < static_cast<int>(deferred_plugin_handles_.size()); i++) { |
1244 #if defined(TOOLKIT_USES_GTK) | 1245 #if defined(TOOLKIT_USES_GTK) |
1245 view_->CreatePluginContainer(deferred_plugin_handles_[i]); | 1246 view_->CreatePluginContainer(deferred_plugin_handles_[i]); |
1246 #endif | 1247 #endif |
1247 } | 1248 } |
1248 | 1249 |
1249 deferred_plugin_handles_.clear(); | 1250 deferred_plugin_handles_.clear(); |
| 1251 #endif |
1250 } | 1252 } |
1251 | 1253 |
1252 void RenderWidgetHost::StartUserGesture() { | 1254 void RenderWidgetHost::StartUserGesture() { |
1253 OnUserGesture(); | 1255 OnUserGesture(); |
1254 } | 1256 } |
OLD | NEW |