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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 IPC_MESSAGE_HANDLER(ViewHostMsg_CompositorSurfaceBuffersSwapped, | 282 IPC_MESSAGE_HANDLER(ViewHostMsg_CompositorSurfaceBuffersSwapped, |
283 OnCompositorSurfaceBuffersSwapped) | 283 OnCompositorSurfaceBuffersSwapped) |
284 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnMsgUpdateRect) | 284 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnMsgUpdateRect) |
285 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateIsDelayed, OnMsgUpdateIsDelayed) | 285 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateIsDelayed, OnMsgUpdateIsDelayed) |
286 IPC_MESSAGE_HANDLER(ViewHostMsg_HandleInputEvent_ACK, OnMsgInputEventAck) | 286 IPC_MESSAGE_HANDLER(ViewHostMsg_HandleInputEvent_ACK, OnMsgInputEventAck) |
287 IPC_MESSAGE_HANDLER(ViewHostMsg_BeginSmoothScroll, OnMsgBeginSmoothScroll) | 287 IPC_MESSAGE_HANDLER(ViewHostMsg_BeginSmoothScroll, OnMsgBeginSmoothScroll) |
288 IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnMsgFocus) | 288 IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnMsgFocus) |
289 IPC_MESSAGE_HANDLER(ViewHostMsg_Blur, OnMsgBlur) | 289 IPC_MESSAGE_HANDLER(ViewHostMsg_Blur, OnMsgBlur) |
290 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeNumTouchEvents, | 290 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeNumTouchEvents, |
291 OnMsgDidChangeNumTouchEvents) | 291 OnMsgDidChangeNumTouchEvents) |
| 292 IPC_MESSAGE_HANDLER(ViewHostMsg_HasTouchEventHandlers, |
| 293 OnMsgHasTouchEventHandlers) |
292 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnMsgSetCursor) | 294 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnMsgSetCursor) |
293 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, | 295 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, |
294 OnMsgTextInputStateChanged) | 296 OnMsgTextInputStateChanged) |
295 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCompositionRangeChanged, | 297 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCompositionRangeChanged, |
296 OnMsgImeCompositionRangeChanged) | 298 OnMsgImeCompositionRangeChanged) |
297 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition, | 299 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition, |
298 OnMsgImeCancelComposition) | 300 OnMsgImeCancelComposition) |
299 IPC_MESSAGE_HANDLER(ViewHostMsg_DidActivateAcceleratedCompositing, | 301 IPC_MESSAGE_HANDLER(ViewHostMsg_DidActivateAcceleratedCompositing, |
300 OnMsgDidActivateAcceleratedCompositing) | 302 OnMsgDidActivateAcceleratedCompositing) |
301 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnMsgLockMouse) | 303 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnMsgLockMouse) |
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1553 void RenderWidgetHostImpl::OnMsgBlur() { | 1555 void RenderWidgetHostImpl::OnMsgBlur() { |
1554 // Only RenderViewHost can deal with that message. | 1556 // Only RenderViewHost can deal with that message. |
1555 RecordAction(UserMetricsAction("BadMessageTerminate_RWH5")); | 1557 RecordAction(UserMetricsAction("BadMessageTerminate_RWH5")); |
1556 GetProcess()->ReceivedBadMessage(); | 1558 GetProcess()->ReceivedBadMessage(); |
1557 } | 1559 } |
1558 | 1560 |
1559 void RenderWidgetHostImpl::OnMsgDidChangeNumTouchEvents(int count) { | 1561 void RenderWidgetHostImpl::OnMsgDidChangeNumTouchEvents(int count) { |
1560 has_touch_handler_ = count > 0; | 1562 has_touch_handler_ = count > 0; |
1561 } | 1563 } |
1562 | 1564 |
| 1565 void RenderWidgetHostImpl::OnMsgHasTouchEventHandlers(bool has_handlers) { |
| 1566 has_touch_handler_ = has_handlers; |
| 1567 } |
| 1568 |
1563 void RenderWidgetHostImpl::OnMsgSetCursor(const WebCursor& cursor) { | 1569 void RenderWidgetHostImpl::OnMsgSetCursor(const WebCursor& cursor) { |
1564 if (!view_) { | 1570 if (!view_) { |
1565 return; | 1571 return; |
1566 } | 1572 } |
1567 view_->UpdateCursor(cursor); | 1573 view_->UpdateCursor(cursor); |
1568 } | 1574 } |
1569 | 1575 |
1570 void RenderWidgetHostImpl::OnMsgTextInputStateChanged( | 1576 void RenderWidgetHostImpl::OnMsgTextInputStateChanged( |
1571 ui::TextInputType type, | 1577 ui::TextInputType type, |
1572 bool can_compose_inline) { | 1578 bool can_compose_inline) { |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1908 // indicate that no callback is in progress (i.e. without this line | 1914 // indicate that no callback is in progress (i.e. without this line |
1909 // DelayedAutoResized will not get called again). | 1915 // DelayedAutoResized will not get called again). |
1910 new_auto_size_.SetSize(0, 0); | 1916 new_auto_size_.SetSize(0, 0); |
1911 if (!should_auto_resize_) | 1917 if (!should_auto_resize_) |
1912 return; | 1918 return; |
1913 | 1919 |
1914 OnRenderAutoResized(new_size); | 1920 OnRenderAutoResized(new_size); |
1915 } | 1921 } |
1916 | 1922 |
1917 } // namespace content | 1923 } // namespace content |
OLD | NEW |