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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 OnMsgTextInputStateChanged) | 274 OnMsgTextInputStateChanged) |
275 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCompositionRangeChanged, | 275 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCompositionRangeChanged, |
276 OnMsgImeCompositionRangeChanged) | 276 OnMsgImeCompositionRangeChanged) |
277 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition, | 277 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition, |
278 OnMsgImeCancelComposition) | 278 OnMsgImeCancelComposition) |
279 IPC_MESSAGE_HANDLER(ViewHostMsg_DidActivateAcceleratedCompositing, | 279 IPC_MESSAGE_HANDLER(ViewHostMsg_DidActivateAcceleratedCompositing, |
280 OnMsgDidActivateAcceleratedCompositing) | 280 OnMsgDidActivateAcceleratedCompositing) |
281 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnMsgLockMouse) | 281 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnMsgLockMouse) |
282 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnMsgUnlockMouse) | 282 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnMsgUnlockMouse) |
283 #if defined(OS_POSIX) || defined(USE_AURA) | 283 #if defined(OS_POSIX) || defined(USE_AURA) |
| 284 IPC_MESSAGE_HANDLER(ViewHostMsg_GetScreenInfo, OnMsgGetScreenInfo) |
284 IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnMsgGetWindowRect) | 285 IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnMsgGetWindowRect) |
285 IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnMsgGetRootWindowRect) | 286 IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnMsgGetRootWindowRect) |
286 #endif | 287 #endif |
287 #if defined(OS_MACOSX) | 288 #if defined(OS_MACOSX) |
288 IPC_MESSAGE_HANDLER(ViewHostMsg_PluginFocusChanged, | 289 IPC_MESSAGE_HANDLER(ViewHostMsg_PluginFocusChanged, |
289 OnMsgPluginFocusChanged) | 290 OnMsgPluginFocusChanged) |
290 IPC_MESSAGE_HANDLER(ViewHostMsg_StartPluginIme, | 291 IPC_MESSAGE_HANDLER(ViewHostMsg_StartPluginIme, |
291 OnMsgStartPluginIme) | 292 OnMsgStartPluginIme) |
292 IPC_MESSAGE_HANDLER(ViewHostMsg_AllocateFakePluginWindowHandle, | 293 IPC_MESSAGE_HANDLER(ViewHostMsg_AllocateFakePluginWindowHandle, |
293 OnAllocateFakePluginWindowHandle) | 294 OnAllocateFakePluginWindowHandle) |
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1499 | 1500 |
1500 pending_mouse_lock_request_ = true; | 1501 pending_mouse_lock_request_ = true; |
1501 RequestToLockMouse(user_gesture, last_unlocked_by_target); | 1502 RequestToLockMouse(user_gesture, last_unlocked_by_target); |
1502 } | 1503 } |
1503 | 1504 |
1504 void RenderWidgetHostImpl::OnMsgUnlockMouse() { | 1505 void RenderWidgetHostImpl::OnMsgUnlockMouse() { |
1505 RejectMouseLockOrUnlockIfNecessary(); | 1506 RejectMouseLockOrUnlockIfNecessary(); |
1506 } | 1507 } |
1507 | 1508 |
1508 #if defined(OS_POSIX) || defined(USE_AURA) | 1509 #if defined(OS_POSIX) || defined(USE_AURA) |
| 1510 void RenderWidgetHostImpl::OnMsgGetScreenInfo(gfx::NativeViewId window_id, |
| 1511 WebKit::WebScreenInfo* results) { |
| 1512 if (view_) |
| 1513 view_->GetScreenInfo(results); |
| 1514 else |
| 1515 RenderWidgetHostViewPort::GetDefaultScreenInfo(results); |
| 1516 } |
| 1517 |
1509 void RenderWidgetHostImpl::OnMsgGetWindowRect(gfx::NativeViewId window_id, | 1518 void RenderWidgetHostImpl::OnMsgGetWindowRect(gfx::NativeViewId window_id, |
1510 gfx::Rect* results) { | 1519 gfx::Rect* results) { |
1511 if (view_) | 1520 if (view_) |
1512 *results = view_->GetViewBounds(); | 1521 *results = view_->GetViewBounds(); |
1513 } | 1522 } |
1514 | 1523 |
1515 void RenderWidgetHostImpl::OnMsgGetRootWindowRect(gfx::NativeViewId window_id, | 1524 void RenderWidgetHostImpl::OnMsgGetRootWindowRect(gfx::NativeViewId window_id, |
1516 gfx::Rect* results) { | 1525 gfx::Rect* results) { |
1517 if (view_) | 1526 if (view_) |
1518 *results = view_->GetRootWindowBounds(); | 1527 *results = view_->GetRootWindowBounds(); |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1787 // indicate that no callback is in progress (i.e. without this line | 1796 // indicate that no callback is in progress (i.e. without this line |
1788 // DelayedAutoResized will not get called again). | 1797 // DelayedAutoResized will not get called again). |
1789 new_auto_size_.SetSize(0, 0); | 1798 new_auto_size_.SetSize(0, 0); |
1790 if (!should_auto_resize_) | 1799 if (!should_auto_resize_) |
1791 return; | 1800 return; |
1792 | 1801 |
1793 OnRenderAutoResized(new_size); | 1802 OnRenderAutoResized(new_size); |
1794 } | 1803 } |
1795 | 1804 |
1796 } // namespace content | 1805 } // namespace content |
OLD | NEW |