Chromium Code Reviews| 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 301 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, | 301 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, |
| 302 OnMsgTextInputStateChanged) | 302 OnMsgTextInputStateChanged) |
| 303 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCompositionRangeChanged, | 303 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCompositionRangeChanged, |
| 304 OnMsgImeCompositionRangeChanged) | 304 OnMsgImeCompositionRangeChanged) |
| 305 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition, | 305 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition, |
| 306 OnMsgImeCancelComposition) | 306 OnMsgImeCancelComposition) |
| 307 IPC_MESSAGE_HANDLER(ViewHostMsg_DidActivateAcceleratedCompositing, | 307 IPC_MESSAGE_HANDLER(ViewHostMsg_DidActivateAcceleratedCompositing, |
| 308 OnMsgDidActivateAcceleratedCompositing) | 308 OnMsgDidActivateAcceleratedCompositing) |
| 309 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnMsgLockMouse) | 309 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnMsgLockMouse) |
| 310 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnMsgUnlockMouse) | 310 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnMsgUnlockMouse) |
| 311 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowDisambiguationPopup, | |
| 312 OnMsgShowDisambiguationPopup) | |
| 311 #if defined(OS_POSIX) || defined(USE_AURA) | 313 #if defined(OS_POSIX) || defined(USE_AURA) |
| 312 IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnMsgGetWindowRect) | 314 IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnMsgGetWindowRect) |
| 313 IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnMsgGetRootWindowRect) | 315 IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnMsgGetRootWindowRect) |
| 314 #endif | 316 #endif |
| 315 #if defined(OS_MACOSX) | 317 #if defined(OS_MACOSX) |
| 316 IPC_MESSAGE_HANDLER(ViewHostMsg_PluginFocusChanged, | 318 IPC_MESSAGE_HANDLER(ViewHostMsg_PluginFocusChanged, |
| 317 OnMsgPluginFocusChanged) | 319 OnMsgPluginFocusChanged) |
| 318 IPC_MESSAGE_HANDLER(ViewHostMsg_StartPluginIme, | 320 IPC_MESSAGE_HANDLER(ViewHostMsg_StartPluginIme, |
| 319 OnMsgStartPluginIme) | 321 OnMsgStartPluginIme) |
| 320 IPC_MESSAGE_HANDLER(ViewHostMsg_AllocateFakePluginWindowHandle, | 322 IPC_MESSAGE_HANDLER(ViewHostMsg_AllocateFakePluginWindowHandle, |
| (...skipping 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1715 void RenderWidgetHostImpl::OnMsgDidActivateAcceleratedCompositing( | 1717 void RenderWidgetHostImpl::OnMsgDidActivateAcceleratedCompositing( |
| 1716 bool activated) { | 1718 bool activated) { |
| 1717 TRACE_EVENT1("renderer_host", | 1719 TRACE_EVENT1("renderer_host", |
| 1718 "RenderWidgetHostImpl::OnMsgDidActivateAcceleratedCompositing", | 1720 "RenderWidgetHostImpl::OnMsgDidActivateAcceleratedCompositing", |
| 1719 "activated", activated); | 1721 "activated", activated); |
| 1720 is_accelerated_compositing_active_ = activated; | 1722 is_accelerated_compositing_active_ = activated; |
| 1721 if (view_) | 1723 if (view_) |
| 1722 view_->OnAcceleratedCompositingStateChange(); | 1724 view_->OnAcceleratedCompositingStateChange(); |
| 1723 } | 1725 } |
| 1724 | 1726 |
| 1727 void RenderWidgetHostImpl::OnMsgShowDisambiguationPopup( | |
|
darin (slow to review)
2012/10/08 21:03:46
nit: please list this after OnMsgUnlockMouse so th
trchen
2012/10/11 23:54:05
Done.
| |
| 1728 const gfx::Rect& rect, | |
| 1729 const gfx::Size& size, | |
| 1730 const TransportDIB::Id& id) { | |
| 1731 TransportDIB* dib = process_->GetTransportDIB(id); | |
| 1732 | |
| 1733 // TODO(trchen): implement the platform-specific disambiguation popup | |
| 1734 NOTIMPLEMENTED(); | |
| 1735 | |
| 1736 Send(new ViewMsg_ReleaseDisambiguationPopupDIB(GetRoutingID(), | |
| 1737 dib->handle())); | |
| 1738 } | |
| 1739 | |
| 1725 void RenderWidgetHostImpl::OnMsgLockMouse(bool user_gesture, | 1740 void RenderWidgetHostImpl::OnMsgLockMouse(bool user_gesture, |
| 1726 bool last_unlocked_by_target, | 1741 bool last_unlocked_by_target, |
| 1727 bool privileged) { | 1742 bool privileged) { |
| 1728 | 1743 |
| 1729 if (pending_mouse_lock_request_) { | 1744 if (pending_mouse_lock_request_) { |
| 1730 Send(new ViewMsg_LockMouse_ACK(routing_id_, false)); | 1745 Send(new ViewMsg_LockMouse_ACK(routing_id_, false)); |
| 1731 return; | 1746 return; |
| 1732 } else if (IsMouseLocked()) { | 1747 } else if (IsMouseLocked()) { |
| 1733 Send(new ViewMsg_LockMouse_ACK(routing_id_, true)); | 1748 Send(new ViewMsg_LockMouse_ACK(routing_id_, true)); |
| 1734 return; | 1749 return; |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2054 // indicate that no callback is in progress (i.e. without this line | 2069 // indicate that no callback is in progress (i.e. without this line |
| 2055 // DelayedAutoResized will not get called again). | 2070 // DelayedAutoResized will not get called again). |
| 2056 new_auto_size_.SetSize(0, 0); | 2071 new_auto_size_.SetSize(0, 0); |
| 2057 if (!should_auto_resize_) | 2072 if (!should_auto_resize_) |
| 2058 return; | 2073 return; |
| 2059 | 2074 |
| 2060 OnRenderAutoResized(new_size); | 2075 OnRenderAutoResized(new_size); |
| 2061 } | 2076 } |
| 2062 | 2077 |
| 2063 } // namespace content | 2078 } // namespace content |
| OLD | NEW |