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

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: merge fix Created 8 years, 2 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, 305 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged,
306 OnMsgTextInputStateChanged) 306 OnMsgTextInputStateChanged)
307 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCompositionRangeChanged, 307 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCompositionRangeChanged,
308 OnMsgImeCompositionRangeChanged) 308 OnMsgImeCompositionRangeChanged)
309 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition, 309 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition,
310 OnMsgImeCancelComposition) 310 OnMsgImeCancelComposition)
311 IPC_MESSAGE_HANDLER(ViewHostMsg_DidActivateAcceleratedCompositing, 311 IPC_MESSAGE_HANDLER(ViewHostMsg_DidActivateAcceleratedCompositing,
312 OnMsgDidActivateAcceleratedCompositing) 312 OnMsgDidActivateAcceleratedCompositing)
313 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnMsgLockMouse) 313 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnMsgLockMouse)
314 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnMsgUnlockMouse) 314 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnMsgUnlockMouse)
315 IPC_MESSAGE_HANDLER(ViewHostMsg_SwapCompositorFrame,
316 OnMsgSwapCompositorFrame)
315 #if defined(OS_POSIX) || defined(USE_AURA) 317 #if defined(OS_POSIX) || defined(USE_AURA)
316 IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnMsgGetWindowRect) 318 IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnMsgGetWindowRect)
317 IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnMsgGetRootWindowRect) 319 IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnMsgGetRootWindowRect)
318 #endif 320 #endif
319 #if defined(OS_MACOSX) 321 #if defined(OS_MACOSX)
320 IPC_MESSAGE_HANDLER(ViewHostMsg_PluginFocusChanged, 322 IPC_MESSAGE_HANDLER(ViewHostMsg_PluginFocusChanged,
321 OnMsgPluginFocusChanged) 323 OnMsgPluginFocusChanged)
322 IPC_MESSAGE_HANDLER(ViewHostMsg_StartPluginIme, 324 IPC_MESSAGE_HANDLER(ViewHostMsg_StartPluginIme,
323 OnMsgStartPluginIme) 325 OnMsgStartPluginIme)
324 IPC_MESSAGE_HANDLER(ViewHostMsg_AllocateFakePluginWindowHandle, 326 IPC_MESSAGE_HANDLER(ViewHostMsg_AllocateFakePluginWindowHandle,
(...skipping 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after
1757 GotResponseToLockMouseRequest(true); 1759 GotResponseToLockMouseRequest(true);
1758 } else { 1760 } else {
1759 RequestToLockMouse(user_gesture, last_unlocked_by_target); 1761 RequestToLockMouse(user_gesture, last_unlocked_by_target);
1760 } 1762 }
1761 } 1763 }
1762 1764
1763 void RenderWidgetHostImpl::OnMsgUnlockMouse() { 1765 void RenderWidgetHostImpl::OnMsgUnlockMouse() {
1764 RejectMouseLockOrUnlockIfNecessary(); 1766 RejectMouseLockOrUnlockIfNecessary();
1765 } 1767 }
1766 1768
1769 void RenderWidgetHostImpl::OnMsgSwapCompositorFrame(
1770 const WebKit::WebCompositorFrame& frame) {
1771 if (!view_) {
1772 WebKit::WebCompositorFrameAck ack;
1773 SwapCompositorFrameAck(ack);
1774 }
1775 view_->SwapCompositorFrame(frame);
1776 }
1777
1778 void RenderWidgetHostImpl::SwapCompositorFrameAck(
1779 const WebKit::WebCompositorFrameAck& ack) {
1780 Send(new ViewMsg_SwapCompositorFrameACK(routing_id_, ack));
1781 }
1782
1767 #if defined(OS_POSIX) || defined(USE_AURA) 1783 #if defined(OS_POSIX) || defined(USE_AURA)
1768 void RenderWidgetHostImpl::OnMsgGetWindowRect(gfx::NativeViewId window_id, 1784 void RenderWidgetHostImpl::OnMsgGetWindowRect(gfx::NativeViewId window_id,
1769 gfx::Rect* results) { 1785 gfx::Rect* results) {
1770 if (view_) 1786 if (view_)
1771 *results = view_->GetViewBounds(); 1787 *results = view_->GetViewBounds();
1772 } 1788 }
1773 1789
1774 void RenderWidgetHostImpl::OnMsgGetRootWindowRect(gfx::NativeViewId window_id, 1790 void RenderWidgetHostImpl::OnMsgGetRootWindowRect(gfx::NativeViewId window_id,
1775 gfx::Rect* results) { 1791 gfx::Rect* results) {
1776 if (view_) 1792 if (view_)
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
2075 return; 2091 return;
2076 2092
2077 OnRenderAutoResized(new_size); 2093 OnRenderAutoResized(new_size);
2078 } 2094 }
2079 2095
2080 void RenderWidgetHostImpl::DetachDelegate() { 2096 void RenderWidgetHostImpl::DetachDelegate() {
2081 delegate_ = NULL; 2097 delegate_ = NULL;
2082 } 2098 }
2083 2099
2084 } // namespace content 2100 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698