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/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 IPC_MESSAGE_HANDLER(ViewHostMsg_Blur, OnMsgBlur) | 173 IPC_MESSAGE_HANDLER(ViewHostMsg_Blur, OnMsgBlur) |
174 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnMsgSetCursor) | 174 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnMsgSetCursor) |
175 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeUpdateTextInputState, | 175 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeUpdateTextInputState, |
176 OnMsgImeUpdateTextInputState) | 176 OnMsgImeUpdateTextInputState) |
177 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCompositionRangeChanged, | 177 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCompositionRangeChanged, |
178 OnMsgImeCompositionRangeChanged) | 178 OnMsgImeCompositionRangeChanged) |
179 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition, | 179 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition, |
180 OnMsgImeCancelComposition) | 180 OnMsgImeCancelComposition) |
181 IPC_MESSAGE_HANDLER(ViewHostMsg_DidActivateAcceleratedCompositing, | 181 IPC_MESSAGE_HANDLER(ViewHostMsg_DidActivateAcceleratedCompositing, |
182 OnMsgDidActivateAcceleratedCompositing) | 182 OnMsgDidActivateAcceleratedCompositing) |
| 183 IPC_MESSAGE_HANDLER(ViewHostMsg_PpapiPluginFocusChanged, |
| 184 OnMsgPpapiPluginFocusChanged) |
183 #if defined(OS_MACOSX) | 185 #if defined(OS_MACOSX) |
184 IPC_MESSAGE_HANDLER(ViewHostMsg_GetScreenInfo, OnMsgGetScreenInfo) | 186 IPC_MESSAGE_HANDLER(ViewHostMsg_GetScreenInfo, OnMsgGetScreenInfo) |
185 IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnMsgGetWindowRect) | 187 IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnMsgGetWindowRect) |
186 IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnMsgGetRootWindowRect) | 188 IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnMsgGetRootWindowRect) |
187 IPC_MESSAGE_HANDLER(ViewHostMsg_PluginFocusChanged, | 189 IPC_MESSAGE_HANDLER(ViewHostMsg_PluginFocusChanged, |
188 OnMsgPluginFocusChanged) | 190 OnMsgPluginFocusChanged) |
189 IPC_MESSAGE_HANDLER(ViewHostMsg_StartPluginIme, | 191 IPC_MESSAGE_HANDLER(ViewHostMsg_StartPluginIme, |
190 OnMsgStartPluginIme) | 192 OnMsgStartPluginIme) |
191 IPC_MESSAGE_HANDLER(ViewHostMsg_AllocateFakePluginWindowHandle, | 193 IPC_MESSAGE_HANDLER(ViewHostMsg_AllocateFakePluginWindowHandle, |
192 OnAllocateFakePluginWindowHandle) | 194 OnAllocateFakePluginWindowHandle) |
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1038 view_->GpuRenderingStateDidChange(); | 1040 view_->GpuRenderingStateDidChange(); |
1039 #elif defined(OS_WIN) | 1041 #elif defined(OS_WIN) |
1040 if (view_) | 1042 if (view_) |
1041 view_->ShowCompositorHostWindow(is_accelerated_compositing_active_); | 1043 view_->ShowCompositorHostWindow(is_accelerated_compositing_active_); |
1042 #elif defined(TOOLKIT_USES_GTK) | 1044 #elif defined(TOOLKIT_USES_GTK) |
1043 if (view_) | 1045 if (view_) |
1044 view_->AcceleratedCompositingActivated(activated); | 1046 view_->AcceleratedCompositingActivated(activated); |
1045 #endif | 1047 #endif |
1046 } | 1048 } |
1047 | 1049 |
| 1050 void RenderWidgetHost::OnMsgPpapiPluginFocusChanged(bool focused) { |
| 1051 if (view_) |
| 1052 view_->PpapiPluginFocusChanged(focused); |
| 1053 } |
| 1054 |
1048 #if defined(OS_MACOSX) | 1055 #if defined(OS_MACOSX) |
1049 | 1056 |
1050 void RenderWidgetHost::OnMsgGetScreenInfo(gfx::NativeViewId view, | 1057 void RenderWidgetHost::OnMsgGetScreenInfo(gfx::NativeViewId view, |
1051 WebScreenInfo* results) { | 1058 WebScreenInfo* results) { |
1052 gfx::NativeView native_view = view_ ? view_->GetNativeView() : NULL; | 1059 gfx::NativeView native_view = view_ ? view_->GetNativeView() : NULL; |
1053 *results = WebScreenInfoFactory::screenInfo(native_view); | 1060 *results = WebScreenInfoFactory::screenInfo(native_view); |
1054 } | 1061 } |
1055 | 1062 |
1056 void RenderWidgetHost::OnMsgGetWindowRect(gfx::NativeViewId window_id, | 1063 void RenderWidgetHost::OnMsgGetWindowRect(gfx::NativeViewId window_id, |
1057 gfx::Rect* results) { | 1064 gfx::Rect* results) { |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1271 view_->CreatePluginContainer(deferred_plugin_handles_[i]); | 1278 view_->CreatePluginContainer(deferred_plugin_handles_[i]); |
1272 #endif | 1279 #endif |
1273 } | 1280 } |
1274 | 1281 |
1275 deferred_plugin_handles_.clear(); | 1282 deferred_plugin_handles_.clear(); |
1276 } | 1283 } |
1277 | 1284 |
1278 void RenderWidgetHost::StartUserGesture() { | 1285 void RenderWidgetHost::StartUserGesture() { |
1279 OnUserGesture(); | 1286 OnUserGesture(); |
1280 } | 1287 } |
OLD | NEW |