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

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

Issue 10915298: Add CCDelegatingRenderer, and corresponding IPCs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: correct base 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 | Annotate | Revision Log
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_SwapCompositorFrame,
306 OnMsgSwapCompositorFrame)
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 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1731 GotResponseToLockMouseRequest(true); 1733 GotResponseToLockMouseRequest(true);
1732 } else { 1734 } else {
1733 RequestToLockMouse(user_gesture, last_unlocked_by_target); 1735 RequestToLockMouse(user_gesture, last_unlocked_by_target);
1734 } 1736 }
1735 } 1737 }
1736 1738
1737 void RenderWidgetHostImpl::OnMsgUnlockMouse() { 1739 void RenderWidgetHostImpl::OnMsgUnlockMouse() {
1738 RejectMouseLockOrUnlockIfNecessary(); 1740 RejectMouseLockOrUnlockIfNecessary();
1739 } 1741 }
1740 1742
1743 void RenderWidgetHostImpl::OnMsgSwapCompositorFrame(
1744 const WebKit::WebCompositorFrame& frame) {
1745 if (!view_) {
1746 WebKit::WebCompositorFrameAck ack;
1747 SwapCompositorFrameAck(ack);
1748 }
1749 view_->SwapCompositorFrame(frame);
1750 }
1751
1752 void RenderWidgetHostImpl::SwapCompositorFrameAck(
1753 const WebKit::WebCompositorFrameAck& ack) {
1754 Send(new ViewMsg_SwapCompositorFrameACK(routing_id_, ack));
1755 }
1756
1741 #if defined(OS_POSIX) || defined(USE_AURA) 1757 #if defined(OS_POSIX) || defined(USE_AURA)
1742 void RenderWidgetHostImpl::OnMsgGetWindowRect(gfx::NativeViewId window_id, 1758 void RenderWidgetHostImpl::OnMsgGetWindowRect(gfx::NativeViewId window_id,
1743 gfx::Rect* results) { 1759 gfx::Rect* results) {
1744 if (view_) 1760 if (view_)
1745 *results = view_->GetViewBounds(); 1761 *results = view_->GetViewBounds();
1746 } 1762 }
1747 1763
1748 void RenderWidgetHostImpl::OnMsgGetRootWindowRect(gfx::NativeViewId window_id, 1764 void RenderWidgetHostImpl::OnMsgGetRootWindowRect(gfx::NativeViewId window_id,
1749 gfx::Rect* results) { 1765 gfx::Rect* results) {
1750 if (view_) 1766 if (view_)
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
2045 // indicate that no callback is in progress (i.e. without this line 2061 // indicate that no callback is in progress (i.e. without this line
2046 // DelayedAutoResized will not get called again). 2062 // DelayedAutoResized will not get called again).
2047 new_auto_size_.SetSize(0, 0); 2063 new_auto_size_.SetSize(0, 0);
2048 if (!should_auto_resize_) 2064 if (!should_auto_resize_)
2049 return; 2065 return;
2050 2066
2051 OnRenderAutoResized(new_size); 2067 OnRenderAutoResized(new_size);
2052 } 2068 }
2053 2069
2054 } // namespace content 2070 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698