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) || defined(OS_ANDROID) | |
478 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCompositionRangeChanged, | 477 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCompositionRangeChanged, |
479 OnImeCompositionRangeChanged) | 478 OnImeCompositionRangeChanged) |
480 #endif | |
481 IPC_MESSAGE_UNHANDLED(handled = false) | 479 IPC_MESSAGE_UNHANDLED(handled = false) |
482 IPC_END_MESSAGE_MAP() | 480 IPC_END_MESSAGE_MAP() |
483 | 481 |
484 if (!handled && input_router_ && input_router_->OnMessageReceived(msg)) | 482 if (!handled && input_router_ && input_router_->OnMessageReceived(msg)) |
485 return true; | 483 return true; |
486 | 484 |
487 if (!handled && view_ && view_->OnMessageReceived(msg)) | 485 if (!handled && view_ && view_->OnMessageReceived(msg)) |
488 return true; | 486 return true; |
489 | 487 |
490 return handled; | 488 return handled; |
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1718 | 1716 |
1719 void RenderWidgetHostImpl::OnTextInputTypeChanged( | 1717 void RenderWidgetHostImpl::OnTextInputTypeChanged( |
1720 ui::TextInputType type, | 1718 ui::TextInputType type, |
1721 ui::TextInputMode input_mode, | 1719 ui::TextInputMode input_mode, |
1722 bool can_compose_inline, | 1720 bool can_compose_inline, |
1723 int flags) { | 1721 int flags) { |
1724 if (view_) | 1722 if (view_) |
1725 view_->TextInputTypeChanged(type, input_mode, can_compose_inline, flags); | 1723 view_->TextInputTypeChanged(type, input_mode, can_compose_inline, flags); |
1726 } | 1724 } |
1727 | 1725 |
1728 #if defined(OS_MACOSX) || defined(USE_AURA) || defined(OS_ANDROID) | |
1729 void RenderWidgetHostImpl::OnImeCompositionRangeChanged( | 1726 void RenderWidgetHostImpl::OnImeCompositionRangeChanged( |
1730 const gfx::Range& range, | 1727 const gfx::Range& range, |
1731 const std::vector<gfx::Rect>& character_bounds) { | 1728 const std::vector<gfx::Rect>& character_bounds) { |
1732 if (view_) | 1729 if (view_) |
1733 view_->ImeCompositionRangeChanged(range, character_bounds); | 1730 view_->ImeCompositionRangeChanged(range, character_bounds); |
1734 } | 1731 } |
1735 #endif | |
1736 | 1732 |
1737 void RenderWidgetHostImpl::OnImeCancelComposition() { | 1733 void RenderWidgetHostImpl::OnImeCancelComposition() { |
1738 if (view_) | 1734 if (view_) |
1739 view_->ImeCancelComposition(); | 1735 view_->ImeCancelComposition(); |
1740 } | 1736 } |
1741 | 1737 |
1742 void RenderWidgetHostImpl::OnLockMouse(bool user_gesture, | 1738 void RenderWidgetHostImpl::OnLockMouse(bool user_gesture, |
1743 bool last_unlocked_by_target, | 1739 bool last_unlocked_by_target, |
1744 bool privileged) { | 1740 bool privileged) { |
1745 | 1741 |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2432 } | 2428 } |
2433 #endif | 2429 #endif |
2434 | 2430 |
2435 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { | 2431 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { |
2436 if (view_) | 2432 if (view_) |
2437 return view_->PreferredReadbackFormat(); | 2433 return view_->PreferredReadbackFormat(); |
2438 return kN32_SkColorType; | 2434 return kN32_SkColorType; |
2439 } | 2435 } |
2440 | 2436 |
2441 } // namespace content | 2437 } // namespace content |
OLD | NEW |