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.h" | 5 #include "content/browser/renderer_host/render_widget_host.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
258 OnMsgTextInputStateChanged) | 258 OnMsgTextInputStateChanged) |
259 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCompositionRangeChanged, | 259 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCompositionRangeChanged, |
260 OnMsgImeCompositionRangeChanged) | 260 OnMsgImeCompositionRangeChanged) |
261 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition, | 261 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition, |
262 OnMsgImeCancelComposition) | 262 OnMsgImeCancelComposition) |
263 IPC_MESSAGE_HANDLER(ViewHostMsg_DidActivateAcceleratedCompositing, | 263 IPC_MESSAGE_HANDLER(ViewHostMsg_DidActivateAcceleratedCompositing, |
264 OnMsgDidActivateAcceleratedCompositing) | 264 OnMsgDidActivateAcceleratedCompositing) |
265 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnMsgLockMouse) | 265 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnMsgLockMouse) |
266 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnMsgUnlockMouse) | 266 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnMsgUnlockMouse) |
267 #if defined(OS_POSIX) || defined(USE_AURA) | 267 #if defined(OS_POSIX) || defined(USE_AURA) |
268 IPC_MESSAGE_HANDLER(ViewHostMsg_GetScreenInfo, OnMsgGetScreenInfo) | |
269 IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnMsgGetWindowRect) | 268 IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnMsgGetWindowRect) |
270 IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnMsgGetRootWindowRect) | 269 IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnMsgGetRootWindowRect) |
271 #endif | 270 #endif |
272 #if defined(OS_MACOSX) | 271 #if defined(OS_MACOSX) |
273 IPC_MESSAGE_HANDLER(ViewHostMsg_PluginFocusChanged, | 272 IPC_MESSAGE_HANDLER(ViewHostMsg_PluginFocusChanged, |
274 OnMsgPluginFocusChanged) | 273 OnMsgPluginFocusChanged) |
275 IPC_MESSAGE_HANDLER(ViewHostMsg_StartPluginIme, | 274 IPC_MESSAGE_HANDLER(ViewHostMsg_StartPluginIme, |
276 OnMsgStartPluginIme) | 275 OnMsgStartPluginIme) |
277 IPC_MESSAGE_HANDLER(ViewHostMsg_AllocateFakePluginWindowHandle, | 276 IPC_MESSAGE_HANDLER(ViewHostMsg_AllocateFakePluginWindowHandle, |
278 OnAllocateFakePluginWindowHandle) | 277 OnAllocateFakePluginWindowHandle) |
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1292 | 1291 |
1293 pending_mouse_lock_request_ = true; | 1292 pending_mouse_lock_request_ = true; |
1294 RequestToLockMouse(); | 1293 RequestToLockMouse(); |
1295 } | 1294 } |
1296 | 1295 |
1297 void RenderWidgetHostImpl::OnMsgUnlockMouse() { | 1296 void RenderWidgetHostImpl::OnMsgUnlockMouse() { |
1298 RejectMouseLockOrUnlockIfNecessary(); | 1297 RejectMouseLockOrUnlockIfNecessary(); |
1299 } | 1298 } |
1300 | 1299 |
1301 #if defined(OS_POSIX) || defined(USE_AURA) | 1300 #if defined(OS_POSIX) || defined(USE_AURA) |
1302 void RenderWidgetHostImpl::OnMsgGetScreenInfo(gfx::NativeViewId window_id, | |
1303 WebKit::WebScreenInfo* results) { | |
1304 if (view_) | |
1305 view_->GetScreenInfo(results); | |
jam
2012/03/01 01:00:17
both this method and the one below are now not cal
Fady Samuel
2012/03/01 01:02:38
They are, they've just been moved into RenderViewH
| |
1306 else | |
1307 RenderWidgetHostViewPort::GetDefaultScreenInfo(results); | |
1308 } | |
1309 | |
1310 void RenderWidgetHostImpl::OnMsgGetWindowRect(gfx::NativeViewId window_id, | 1301 void RenderWidgetHostImpl::OnMsgGetWindowRect(gfx::NativeViewId window_id, |
1311 gfx::Rect* results) { | 1302 gfx::Rect* results) { |
1312 if (view_) | 1303 if (view_) |
1313 *results = view_->GetViewBounds(); | 1304 *results = view_->GetViewBounds(); |
1314 } | 1305 } |
1315 | 1306 |
1316 void RenderWidgetHostImpl::OnMsgGetRootWindowRect(gfx::NativeViewId window_id, | 1307 void RenderWidgetHostImpl::OnMsgGetRootWindowRect(gfx::NativeViewId window_id, |
1317 gfx::Rect* results) { | 1308 gfx::Rect* results) { |
1318 if (view_) | 1309 if (view_) |
1319 *results = view_->GetRootWindowBounds(); | 1310 *results = view_->GetRootWindowBounds(); |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1579 ui_shim->Send(new AcceleratedSurfaceMsg_BuffersSwappedACK(route_id)); | 1570 ui_shim->Send(new AcceleratedSurfaceMsg_BuffersSwappedACK(route_id)); |
1580 } | 1571 } |
1581 | 1572 |
1582 // static | 1573 // static |
1583 void RenderWidgetHostImpl::AcknowledgePostSubBuffer(int32 route_id, | 1574 void RenderWidgetHostImpl::AcknowledgePostSubBuffer(int32 route_id, |
1584 int gpu_host_id) { | 1575 int gpu_host_id) { |
1585 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); | 1576 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); |
1586 if (ui_shim) | 1577 if (ui_shim) |
1587 ui_shim->Send(new AcceleratedSurfaceMsg_PostSubBufferACK(route_id)); | 1578 ui_shim->Send(new AcceleratedSurfaceMsg_PostSubBufferACK(route_id)); |
1588 } | 1579 } |
OLD | NEW |