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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 OnShowDisambiguationPopup) | 467 OnShowDisambiguationPopup) |
468 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnSelectionChanged) | 468 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnSelectionChanged) |
469 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged, | 469 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged, |
470 OnSelectionBoundsChanged) | 470 OnSelectionBoundsChanged) |
471 #if defined(OS_WIN) | 471 #if defined(OS_WIN) |
472 IPC_MESSAGE_HANDLER(ViewHostMsg_WindowlessPluginDummyWindowCreated, | 472 IPC_MESSAGE_HANDLER(ViewHostMsg_WindowlessPluginDummyWindowCreated, |
473 OnWindowlessPluginDummyWindowCreated) | 473 OnWindowlessPluginDummyWindowCreated) |
474 IPC_MESSAGE_HANDLER(ViewHostMsg_WindowlessPluginDummyWindowDestroyed, | 474 IPC_MESSAGE_HANDLER(ViewHostMsg_WindowlessPluginDummyWindowDestroyed, |
475 OnWindowlessPluginDummyWindowDestroyed) | 475 OnWindowlessPluginDummyWindowDestroyed) |
476 #endif | 476 #endif |
477 #if defined(OS_MACOSX) || defined(USE_AURA) | 477 #if defined(OS_MACOSX) || defined(USE_AURA) || defined(OS_ANDROID) |
478 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCompositionRangeChanged, | 478 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCompositionRangeChanged, |
479 OnImeCompositionRangeChanged) | 479 OnImeCompositionRangeChanged) |
480 #endif | 480 #endif |
481 IPC_MESSAGE_UNHANDLED(handled = false) | 481 IPC_MESSAGE_UNHANDLED(handled = false) |
482 IPC_END_MESSAGE_MAP() | 482 IPC_END_MESSAGE_MAP() |
483 | 483 |
484 if (!handled && input_router_ && input_router_->OnMessageReceived(msg)) | 484 if (!handled && input_router_ && input_router_->OnMessageReceived(msg)) |
485 return true; | 485 return true; |
486 | 486 |
487 if (!handled && view_ && view_->OnMessageReceived(msg)) | 487 if (!handled && view_ && view_->OnMessageReceived(msg)) |
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1679 } | 1679 } |
1680 | 1680 |
1681 void RenderWidgetHostImpl::OnTextInputTypeChanged( | 1681 void RenderWidgetHostImpl::OnTextInputTypeChanged( |
1682 ui::TextInputType type, | 1682 ui::TextInputType type, |
1683 ui::TextInputMode input_mode, | 1683 ui::TextInputMode input_mode, |
1684 bool can_compose_inline) { | 1684 bool can_compose_inline) { |
1685 if (view_) | 1685 if (view_) |
1686 view_->TextInputTypeChanged(type, input_mode, can_compose_inline); | 1686 view_->TextInputTypeChanged(type, input_mode, can_compose_inline); |
1687 } | 1687 } |
1688 | 1688 |
1689 #if defined(OS_MACOSX) || defined(USE_AURA) | 1689 #if defined(OS_MACOSX) || defined(USE_AURA) || defined(OS_ANDROID) |
1690 void RenderWidgetHostImpl::OnImeCompositionRangeChanged( | 1690 void RenderWidgetHostImpl::OnImeCompositionRangeChanged( |
1691 const gfx::Range& range, | 1691 const gfx::Range& range, |
1692 const std::vector<gfx::Rect>& character_bounds) { | 1692 const std::vector<gfx::Rect>& character_bounds) { |
1693 if (view_) | 1693 if (view_) |
1694 view_->ImeCompositionRangeChanged(range, character_bounds); | 1694 view_->ImeCompositionRangeChanged(range, character_bounds); |
1695 } | 1695 } |
1696 #endif | 1696 #endif |
1697 | 1697 |
1698 void RenderWidgetHostImpl::OnImeCancelComposition() { | 1698 void RenderWidgetHostImpl::OnImeCancelComposition() { |
1699 if (view_) | 1699 if (view_) |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2397 } | 2397 } |
2398 #endif | 2398 #endif |
2399 | 2399 |
2400 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { | 2400 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { |
2401 if (view_) | 2401 if (view_) |
2402 return view_->PreferredReadbackFormat(); | 2402 return view_->PreferredReadbackFormat(); |
2403 return kN32_SkColorType; | 2403 return kN32_SkColorType; |
2404 } | 2404 } |
2405 | 2405 |
2406 } // namespace content | 2406 } // namespace content |
OLD | NEW |