Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(539)

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 10885004: Implement disambiguation popup (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rename IPCs, move popup size calculation to helper class Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, 295 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged,
296 OnMsgTextInputStateChanged) 296 OnMsgTextInputStateChanged)
297 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCompositionRangeChanged, 297 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCompositionRangeChanged,
298 OnMsgImeCompositionRangeChanged) 298 OnMsgImeCompositionRangeChanged)
299 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition, 299 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition,
300 OnMsgImeCancelComposition) 300 OnMsgImeCancelComposition)
301 IPC_MESSAGE_HANDLER(ViewHostMsg_DidActivateAcceleratedCompositing, 301 IPC_MESSAGE_HANDLER(ViewHostMsg_DidActivateAcceleratedCompositing,
302 OnMsgDidActivateAcceleratedCompositing) 302 OnMsgDidActivateAcceleratedCompositing)
303 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnMsgLockMouse) 303 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnMsgLockMouse)
304 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnMsgUnlockMouse) 304 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnMsgUnlockMouse)
305 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowDisambiguationPopup,
306 OnMsgShowDisambiguationPopup)
305 #if defined(OS_POSIX) || defined(USE_AURA) 307 #if defined(OS_POSIX) || defined(USE_AURA)
306 IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnMsgGetWindowRect) 308 IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnMsgGetWindowRect)
307 IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnMsgGetRootWindowRect) 309 IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnMsgGetRootWindowRect)
308 #endif 310 #endif
309 #if defined(OS_MACOSX) 311 #if defined(OS_MACOSX)
310 IPC_MESSAGE_HANDLER(ViewHostMsg_PluginFocusChanged, 312 IPC_MESSAGE_HANDLER(ViewHostMsg_PluginFocusChanged,
311 OnMsgPluginFocusChanged) 313 OnMsgPluginFocusChanged)
312 IPC_MESSAGE_HANDLER(ViewHostMsg_StartPluginIme, 314 IPC_MESSAGE_HANDLER(ViewHostMsg_StartPluginIme,
313 OnMsgStartPluginIme) 315 OnMsgStartPluginIme)
314 IPC_MESSAGE_HANDLER(ViewHostMsg_AllocateFakePluginWindowHandle, 316 IPC_MESSAGE_HANDLER(ViewHostMsg_AllocateFakePluginWindowHandle,
(...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1699 void RenderWidgetHostImpl::OnMsgDidActivateAcceleratedCompositing( 1701 void RenderWidgetHostImpl::OnMsgDidActivateAcceleratedCompositing(
1700 bool activated) { 1702 bool activated) {
1701 TRACE_EVENT1("renderer_host", 1703 TRACE_EVENT1("renderer_host",
1702 "RenderWidgetHostImpl::OnMsgDidActivateAcceleratedCompositing", 1704 "RenderWidgetHostImpl::OnMsgDidActivateAcceleratedCompositing",
1703 "activated", activated); 1705 "activated", activated);
1704 is_accelerated_compositing_active_ = activated; 1706 is_accelerated_compositing_active_ = activated;
1705 if (view_) 1707 if (view_)
1706 view_->OnAcceleratedCompositingStateChange(); 1708 view_->OnAcceleratedCompositingStateChange();
1707 } 1709 }
1708 1710
1711 void RenderWidgetHostImpl::OnMsgShowDisambiguationPopup(
1712 const gfx::Rect& rect,
1713 const gfx::Size& size,
1714 const TransportDIB::Id& id) {
1715 TransportDIB* dib = process_->GetTransportDIB(id);
1716
1717 // TODO: implement the platform-specific disambiguation popup
darin (slow to review) 2012/08/31 23:00:16 nit: indent comment by 2 spaces
1718 NOTIMPLEMENTED();
1719
1720 Send(new ViewMsg_ReleaseDisambiguationPopupDIB(GetRoutingID(),
1721 dib->handle()));
1722 }
1723
1709 void RenderWidgetHostImpl::OnMsgLockMouse(bool user_gesture, 1724 void RenderWidgetHostImpl::OnMsgLockMouse(bool user_gesture,
1710 bool last_unlocked_by_target, 1725 bool last_unlocked_by_target,
1711 bool privileged) { 1726 bool privileged) {
1712 1727
1713 if (pending_mouse_lock_request_) { 1728 if (pending_mouse_lock_request_) {
1714 Send(new ViewMsg_LockMouse_ACK(routing_id_, false)); 1729 Send(new ViewMsg_LockMouse_ACK(routing_id_, false));
1715 return; 1730 return;
1716 } else if (IsMouseLocked()) { 1731 } else if (IsMouseLocked()) {
1717 Send(new ViewMsg_LockMouse_ACK(routing_id_, true)); 1732 Send(new ViewMsg_LockMouse_ACK(routing_id_, true));
1718 return; 1733 return;
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
2038 // indicate that no callback is in progress (i.e. without this line 2053 // indicate that no callback is in progress (i.e. without this line
2039 // DelayedAutoResized will not get called again). 2054 // DelayedAutoResized will not get called again).
2040 new_auto_size_.SetSize(0, 0); 2055 new_auto_size_.SetSize(0, 0);
2041 if (!should_auto_resize_) 2056 if (!should_auto_resize_)
2042 return; 2057 return;
2043 2058
2044 OnRenderAutoResized(new_size); 2059 OnRenderAutoResized(new_size);
2045 } 2060 }
2046 2061
2047 } // namespace content 2062 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698