| 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 <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, | 307 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, |
| 308 OnMsgTextInputStateChanged) | 308 OnMsgTextInputStateChanged) |
| 309 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCompositionRangeChanged, | 309 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCompositionRangeChanged, |
| 310 OnMsgImeCompositionRangeChanged) | 310 OnMsgImeCompositionRangeChanged) |
| 311 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition, | 311 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition, |
| 312 OnMsgImeCancelComposition) | 312 OnMsgImeCancelComposition) |
| 313 IPC_MESSAGE_HANDLER(ViewHostMsg_DidActivateAcceleratedCompositing, | 313 IPC_MESSAGE_HANDLER(ViewHostMsg_DidActivateAcceleratedCompositing, |
| 314 OnMsgDidActivateAcceleratedCompositing) | 314 OnMsgDidActivateAcceleratedCompositing) |
| 315 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnMsgLockMouse) | 315 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnMsgLockMouse) |
| 316 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnMsgUnlockMouse) | 316 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnMsgUnlockMouse) |
| 317 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowDisambiguationPopup, |
| 318 OnMsgShowDisambiguationPopup) |
| 317 #if defined(OS_POSIX) || defined(USE_AURA) | 319 #if defined(OS_POSIX) || defined(USE_AURA) |
| 318 IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnMsgGetWindowRect) | 320 IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnMsgGetWindowRect) |
| 319 IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnMsgGetRootWindowRect) | 321 IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnMsgGetRootWindowRect) |
| 320 #endif | 322 #endif |
| 321 #if defined(OS_MACOSX) | 323 #if defined(OS_MACOSX) |
| 322 IPC_MESSAGE_HANDLER(ViewHostMsg_PluginFocusChanged, | 324 IPC_MESSAGE_HANDLER(ViewHostMsg_PluginFocusChanged, |
| 323 OnMsgPluginFocusChanged) | 325 OnMsgPluginFocusChanged) |
| 324 IPC_MESSAGE_HANDLER(ViewHostMsg_StartPluginIme, | 326 IPC_MESSAGE_HANDLER(ViewHostMsg_StartPluginIme, |
| 325 OnMsgStartPluginIme) | 327 OnMsgStartPluginIme) |
| 326 IPC_MESSAGE_HANDLER(ViewHostMsg_AllocateFakePluginWindowHandle, | 328 IPC_MESSAGE_HANDLER(ViewHostMsg_AllocateFakePluginWindowHandle, |
| (...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1803 GotResponseToLockMouseRequest(true); | 1805 GotResponseToLockMouseRequest(true); |
| 1804 } else { | 1806 } else { |
| 1805 RequestToLockMouse(user_gesture, last_unlocked_by_target); | 1807 RequestToLockMouse(user_gesture, last_unlocked_by_target); |
| 1806 } | 1808 } |
| 1807 } | 1809 } |
| 1808 | 1810 |
| 1809 void RenderWidgetHostImpl::OnMsgUnlockMouse() { | 1811 void RenderWidgetHostImpl::OnMsgUnlockMouse() { |
| 1810 RejectMouseLockOrUnlockIfNecessary(); | 1812 RejectMouseLockOrUnlockIfNecessary(); |
| 1811 } | 1813 } |
| 1812 | 1814 |
| 1815 void RenderWidgetHostImpl::OnMsgShowDisambiguationPopup( |
| 1816 const gfx::Rect& rect, |
| 1817 const gfx::Size& size, |
| 1818 const TransportDIB::Id& id) { |
| 1819 TransportDIB* dib = process_->GetTransportDIB(id); |
| 1820 |
| 1821 // TODO(trchen): implement the platform-specific disambiguation popup |
| 1822 NOTIMPLEMENTED(); |
| 1823 |
| 1824 Send(new ViewMsg_ReleaseDisambiguationPopupDIB(GetRoutingID(), |
| 1825 dib->handle())); |
| 1826 } |
| 1827 |
| 1813 #if defined(OS_POSIX) || defined(USE_AURA) | 1828 #if defined(OS_POSIX) || defined(USE_AURA) |
| 1814 void RenderWidgetHostImpl::OnMsgGetWindowRect(gfx::NativeViewId window_id, | 1829 void RenderWidgetHostImpl::OnMsgGetWindowRect(gfx::NativeViewId window_id, |
| 1815 gfx::Rect* results) { | 1830 gfx::Rect* results) { |
| 1816 if (view_) | 1831 if (view_) |
| 1817 *results = view_->GetViewBounds(); | 1832 *results = view_->GetViewBounds(); |
| 1818 } | 1833 } |
| 1819 | 1834 |
| 1820 void RenderWidgetHostImpl::OnMsgGetRootWindowRect(gfx::NativeViewId window_id, | 1835 void RenderWidgetHostImpl::OnMsgGetRootWindowRect(gfx::NativeViewId window_id, |
| 1821 gfx::Rect* results) { | 1836 gfx::Rect* results) { |
| 1822 if (view_) | 1837 if (view_) |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2121 return; | 2136 return; |
| 2122 | 2137 |
| 2123 OnRenderAutoResized(new_size); | 2138 OnRenderAutoResized(new_size); |
| 2124 } | 2139 } |
| 2125 | 2140 |
| 2126 void RenderWidgetHostImpl::DetachDelegate() { | 2141 void RenderWidgetHostImpl::DetachDelegate() { |
| 2127 delegate_ = NULL; | 2142 delegate_ = NULL; |
| 2128 } | 2143 } |
| 2129 | 2144 |
| 2130 } // namespace content | 2145 } // namespace content |
| OLD | NEW |