| 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/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnMsgClose) | 167 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnMsgClose) |
| 168 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnMsgRequestMove) | 168 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnMsgRequestMove) |
| 169 IPC_MESSAGE_HANDLER(ViewHostMsg_PaintAtSize_ACK, OnMsgPaintAtSizeAck) | 169 IPC_MESSAGE_HANDLER(ViewHostMsg_PaintAtSize_ACK, OnMsgPaintAtSizeAck) |
| 170 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnMsgUpdateRect) | 170 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnMsgUpdateRect) |
| 171 IPC_MESSAGE_HANDLER(ViewHostMsg_HandleInputEvent_ACK, OnMsgInputEventAck) | 171 IPC_MESSAGE_HANDLER(ViewHostMsg_HandleInputEvent_ACK, OnMsgInputEventAck) |
| 172 IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnMsgFocus) | 172 IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnMsgFocus) |
| 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, |
| 178 OnMsgImeCompositionRangeChanged) |
| 177 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition, | 179 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition, |
| 178 OnMsgImeCancelComposition) | 180 OnMsgImeCancelComposition) |
| 179 IPC_MESSAGE_HANDLER(ViewHostMsg_DidActivateAcceleratedCompositing, | 181 IPC_MESSAGE_HANDLER(ViewHostMsg_DidActivateAcceleratedCompositing, |
| 180 OnMsgDidActivateAcceleratedCompositing) | 182 OnMsgDidActivateAcceleratedCompositing) |
| 181 #if defined(OS_MACOSX) | 183 #if defined(OS_MACOSX) |
| 182 IPC_MESSAGE_HANDLER(ViewHostMsg_GetScreenInfo, OnMsgGetScreenInfo) | 184 IPC_MESSAGE_HANDLER(ViewHostMsg_GetScreenInfo, OnMsgGetScreenInfo) |
| 183 IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnMsgGetWindowRect) | 185 IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnMsgGetWindowRect) |
| 184 IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnMsgGetRootWindowRect) | 186 IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnMsgGetRootWindowRect) |
| 185 IPC_MESSAGE_HANDLER(ViewHostMsg_PluginFocusChanged, | 187 IPC_MESSAGE_HANDLER(ViewHostMsg_PluginFocusChanged, |
| 186 OnMsgPluginFocusChanged) | 188 OnMsgPluginFocusChanged) |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1022 view_->UpdateCursor(cursor); | 1024 view_->UpdateCursor(cursor); |
| 1023 } | 1025 } |
| 1024 | 1026 |
| 1025 void RenderWidgetHost::OnMsgImeUpdateTextInputState( | 1027 void RenderWidgetHost::OnMsgImeUpdateTextInputState( |
| 1026 WebKit::WebTextInputType type, | 1028 WebKit::WebTextInputType type, |
| 1027 const gfx::Rect& caret_rect) { | 1029 const gfx::Rect& caret_rect) { |
| 1028 if (view_) | 1030 if (view_) |
| 1029 view_->ImeUpdateTextInputState(type, caret_rect); | 1031 view_->ImeUpdateTextInputState(type, caret_rect); |
| 1030 } | 1032 } |
| 1031 | 1033 |
| 1034 void RenderWidgetHost::OnMsgImeCompositionRangeChanged(const ui::Range& range) { |
| 1035 if (view_) |
| 1036 view_->ImeCompositionRangeChanged(range); |
| 1037 } |
| 1038 |
| 1032 void RenderWidgetHost::OnMsgImeCancelComposition() { | 1039 void RenderWidgetHost::OnMsgImeCancelComposition() { |
| 1033 if (view_) | 1040 if (view_) |
| 1034 view_->ImeCancelComposition(); | 1041 view_->ImeCancelComposition(); |
| 1035 } | 1042 } |
| 1036 | 1043 |
| 1037 void RenderWidgetHost::OnMsgDidActivateAcceleratedCompositing(bool activated) { | 1044 void RenderWidgetHost::OnMsgDidActivateAcceleratedCompositing(bool activated) { |
| 1038 #if defined(OS_MACOSX) | 1045 #if defined(OS_MACOSX) |
| 1039 bool old_state = is_accelerated_compositing_active_; | 1046 bool old_state = is_accelerated_compositing_active_; |
| 1040 #endif | 1047 #endif |
| 1041 is_accelerated_compositing_active_ = activated; | 1048 is_accelerated_compositing_active_ = activated; |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1289 view_->CreatePluginContainer(deferred_plugin_handles_[i]); | 1296 view_->CreatePluginContainer(deferred_plugin_handles_[i]); |
| 1290 #endif | 1297 #endif |
| 1291 } | 1298 } |
| 1292 | 1299 |
| 1293 deferred_plugin_handles_.clear(); | 1300 deferred_plugin_handles_.clear(); |
| 1294 } | 1301 } |
| 1295 | 1302 |
| 1296 void RenderWidgetHost::StartUserGesture() { | 1303 void RenderWidgetHost::StartUserGesture() { |
| 1297 OnUserGesture(); | 1304 OnUserGesture(); |
| 1298 } | 1305 } |
| OLD | NEW |