| 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 <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 OnImeCancelComposition) | 447 OnImeCancelComposition) |
| 448 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) | 448 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) |
| 449 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateScreenRects_ACK, | 449 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateScreenRects_ACK, |
| 450 OnUpdateScreenRectsAck) | 450 OnUpdateScreenRectsAck) |
| 451 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) | 451 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) |
| 452 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnSetTooltipText) | 452 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnSetTooltipText) |
| 453 IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_SwapCompositorFrame, | 453 IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_SwapCompositorFrame, |
| 454 OnSwapCompositorFrame(msg)) | 454 OnSwapCompositorFrame(msg)) |
| 455 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect) | 455 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect) |
| 456 IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnFocus) | 456 IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnFocus) |
| 457 IPC_MESSAGE_HANDLER(ViewHostMsg_Blur, OnBlur) | |
| 458 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnSetCursor) | 457 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnSetCursor) |
| 459 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, | 458 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, |
| 460 OnTextInputStateChanged) | 459 OnTextInputStateChanged) |
| 461 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnLockMouse) | 460 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnLockMouse) |
| 462 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnUnlockMouse) | 461 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnUnlockMouse) |
| 463 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowDisambiguationPopup, | 462 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowDisambiguationPopup, |
| 464 OnShowDisambiguationPopup) | 463 OnShowDisambiguationPopup) |
| 465 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnSelectionChanged) | 464 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnSelectionChanged) |
| 466 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged, | 465 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged, |
| 467 OnSelectionBoundsChanged) | 466 OnSelectionBoundsChanged) |
| (...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1678 SyntheticGesture::Create(*gesture_packet.gesture_params()), | 1677 SyntheticGesture::Create(*gesture_packet.gesture_params()), |
| 1679 base::Bind(&RenderWidgetHostImpl::OnSyntheticGestureCompleted, | 1678 base::Bind(&RenderWidgetHostImpl::OnSyntheticGestureCompleted, |
| 1680 weak_factory_.GetWeakPtr())); | 1679 weak_factory_.GetWeakPtr())); |
| 1681 } | 1680 } |
| 1682 | 1681 |
| 1683 void RenderWidgetHostImpl::OnFocus() { | 1682 void RenderWidgetHostImpl::OnFocus() { |
| 1684 // Only RenderViewHost can deal with that message. | 1683 // Only RenderViewHost can deal with that message. |
| 1685 bad_message::ReceivedBadMessage(GetProcess(), bad_message::RWH_FOCUS); | 1684 bad_message::ReceivedBadMessage(GetProcess(), bad_message::RWH_FOCUS); |
| 1686 } | 1685 } |
| 1687 | 1686 |
| 1688 void RenderWidgetHostImpl::OnBlur() { | |
| 1689 // Only RenderViewHost can deal with that message. | |
| 1690 bad_message::ReceivedBadMessage(GetProcess(), bad_message::RWH_BLUR); | |
| 1691 } | |
| 1692 | |
| 1693 void RenderWidgetHostImpl::OnSetCursor(const WebCursor& cursor) { | 1687 void RenderWidgetHostImpl::OnSetCursor(const WebCursor& cursor) { |
| 1694 SetCursor(cursor); | 1688 SetCursor(cursor); |
| 1695 } | 1689 } |
| 1696 | 1690 |
| 1697 void RenderWidgetHostImpl::SetTouchEventEmulationEnabled( | 1691 void RenderWidgetHostImpl::SetTouchEventEmulationEnabled( |
| 1698 bool enabled, ui::GestureProviderConfigType config_type) { | 1692 bool enabled, ui::GestureProviderConfigType config_type) { |
| 1699 if (enabled) { | 1693 if (enabled) { |
| 1700 if (!touch_emulator_) { | 1694 if (!touch_emulator_) { |
| 1701 touch_emulator_.reset(new TouchEmulator( | 1695 touch_emulator_.reset(new TouchEmulator( |
| 1702 this, view_ ? content::GetScaleFactorForView(view_) : 1.0f)); | 1696 this, view_ ? content::GetScaleFactorForView(view_) : 1.0f)); |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2190 } | 2184 } |
| 2191 | 2185 |
| 2192 #if defined(OS_WIN) | 2186 #if defined(OS_WIN) |
| 2193 gfx::NativeViewAccessible | 2187 gfx::NativeViewAccessible |
| 2194 RenderWidgetHostImpl::GetParentNativeViewAccessible() { | 2188 RenderWidgetHostImpl::GetParentNativeViewAccessible() { |
| 2195 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; | 2189 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; |
| 2196 } | 2190 } |
| 2197 #endif | 2191 #endif |
| 2198 | 2192 |
| 2199 } // namespace content | 2193 } // namespace content |
| OLD | NEW |