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 <math.h> | 7 #include <math.h> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 OnShowDisambiguationPopup) | 468 OnShowDisambiguationPopup) |
469 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnSelectionChanged) | 469 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnSelectionChanged) |
470 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged, | 470 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged, |
471 OnSelectionBoundsChanged) | 471 OnSelectionBoundsChanged) |
472 #if defined(OS_WIN) | 472 #if defined(OS_WIN) |
473 IPC_MESSAGE_HANDLER(ViewHostMsg_WindowlessPluginDummyWindowCreated, | 473 IPC_MESSAGE_HANDLER(ViewHostMsg_WindowlessPluginDummyWindowCreated, |
474 OnWindowlessPluginDummyWindowCreated) | 474 OnWindowlessPluginDummyWindowCreated) |
475 IPC_MESSAGE_HANDLER(ViewHostMsg_WindowlessPluginDummyWindowDestroyed, | 475 IPC_MESSAGE_HANDLER(ViewHostMsg_WindowlessPluginDummyWindowDestroyed, |
476 OnWindowlessPluginDummyWindowDestroyed) | 476 OnWindowlessPluginDummyWindowDestroyed) |
477 #endif | 477 #endif |
478 #if defined(OS_MACOSX) || defined(USE_AURA) || defined(OS_ANDROID) | |
479 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCompositionRangeChanged, | 478 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCompositionRangeChanged, |
480 OnImeCompositionRangeChanged) | 479 OnImeCompositionRangeChanged) |
481 #endif | |
482 IPC_MESSAGE_UNHANDLED(handled = false) | 480 IPC_MESSAGE_UNHANDLED(handled = false) |
483 IPC_END_MESSAGE_MAP() | 481 IPC_END_MESSAGE_MAP() |
484 | 482 |
485 if (!handled && input_router_ && input_router_->OnMessageReceived(msg)) | 483 if (!handled && input_router_ && input_router_->OnMessageReceived(msg)) |
486 return true; | 484 return true; |
487 | 485 |
488 if (!handled && view_ && view_->OnMessageReceived(msg)) | 486 if (!handled && view_ && view_->OnMessageReceived(msg)) |
489 return true; | 487 return true; |
490 | 488 |
491 return handled; | 489 return handled; |
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1620 | 1618 |
1621 void RenderWidgetHostImpl::OnTextInputTypeChanged( | 1619 void RenderWidgetHostImpl::OnTextInputTypeChanged( |
1622 ui::TextInputType type, | 1620 ui::TextInputType type, |
1623 ui::TextInputMode input_mode, | 1621 ui::TextInputMode input_mode, |
1624 bool can_compose_inline, | 1622 bool can_compose_inline, |
1625 int flags) { | 1623 int flags) { |
1626 if (view_) | 1624 if (view_) |
1627 view_->TextInputTypeChanged(type, input_mode, can_compose_inline, flags); | 1625 view_->TextInputTypeChanged(type, input_mode, can_compose_inline, flags); |
1628 } | 1626 } |
1629 | 1627 |
1630 #if defined(OS_MACOSX) || defined(USE_AURA) || defined(OS_ANDROID) | |
1631 void RenderWidgetHostImpl::OnImeCompositionRangeChanged( | 1628 void RenderWidgetHostImpl::OnImeCompositionRangeChanged( |
1632 const gfx::Range& range, | 1629 const gfx::Range& range, |
1633 const std::vector<gfx::Rect>& character_bounds) { | 1630 const std::vector<gfx::Rect>& character_bounds) { |
1634 if (view_) | 1631 if (view_) |
1635 view_->ImeCompositionRangeChanged(range, character_bounds); | 1632 view_->ImeCompositionRangeChanged(range, character_bounds); |
1636 } | 1633 } |
1637 #endif | |
1638 | 1634 |
1639 void RenderWidgetHostImpl::OnImeCancelComposition() { | 1635 void RenderWidgetHostImpl::OnImeCancelComposition() { |
1640 if (view_) | 1636 if (view_) |
1641 view_->ImeCancelComposition(); | 1637 view_->ImeCancelComposition(); |
1642 } | 1638 } |
1643 | 1639 |
1644 void RenderWidgetHostImpl::OnLockMouse(bool user_gesture, | 1640 void RenderWidgetHostImpl::OnLockMouse(bool user_gesture, |
1645 bool last_unlocked_by_target, | 1641 bool last_unlocked_by_target, |
1646 bool privileged) { | 1642 bool privileged) { |
1647 | 1643 |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2178 } | 2174 } |
2179 #endif | 2175 #endif |
2180 | 2176 |
2181 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { | 2177 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { |
2182 if (view_) | 2178 if (view_) |
2183 return view_->PreferredReadbackFormat(); | 2179 return view_->PreferredReadbackFormat(); |
2184 return kN32_SkColorType; | 2180 return kN32_SkColorType; |
2185 } | 2181 } |
2186 | 2182 |
2187 } // namespace content | 2183 } // namespace content |
OLD | NEW |