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_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 } | 851 } |
852 } | 852 } |
853 | 853 |
854 void RenderWidgetHostViewAura::OnTextInputStateChanged( | 854 void RenderWidgetHostViewAura::OnTextInputStateChanged( |
855 const ViewHostMsg_TextInputState_Params& params) { | 855 const ViewHostMsg_TextInputState_Params& params) { |
856 text_input_flags_ = params.flags; | 856 text_input_flags_ = params.flags; |
857 if (params.show_ime_if_needed && params.type != ui::TEXT_INPUT_TYPE_NONE) { | 857 if (params.show_ime_if_needed && params.type != ui::TEXT_INPUT_TYPE_NONE) { |
858 if (GetInputMethod()) | 858 if (GetInputMethod()) |
859 GetInputMethod()->ShowImeIfNeeded(); | 859 GetInputMethod()->ShowImeIfNeeded(); |
860 } | 860 } |
| 861 if (!GetInputMethod()->SupportsOnScreenKeyboard()) |
| 862 OnKeyboardBoundsUnchanged(); |
861 } | 863 } |
862 | 864 |
863 void RenderWidgetHostViewAura::ImeCancelComposition() { | 865 void RenderWidgetHostViewAura::ImeCancelComposition() { |
864 if (GetInputMethod()) | 866 if (GetInputMethod()) |
865 GetInputMethod()->CancelComposition(this); | 867 GetInputMethod()->CancelComposition(this); |
866 has_composition_text_ = false; | 868 has_composition_text_ = false; |
867 } | 869 } |
868 | 870 |
869 void RenderWidgetHostViewAura::ImeCompositionRangeChanged( | 871 void RenderWidgetHostViewAura::ImeCompositionRangeChanged( |
870 const gfx::Range& range, | 872 const gfx::Range& range, |
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1652 host_->CandidateWindowHidden(); | 1654 host_->CandidateWindowHidden(); |
1653 } | 1655 } |
1654 | 1656 |
1655 bool RenderWidgetHostViewAura::IsEditingCommandEnabled(int command_id) { | 1657 bool RenderWidgetHostViewAura::IsEditingCommandEnabled(int command_id) { |
1656 return false; | 1658 return false; |
1657 } | 1659 } |
1658 | 1660 |
1659 void RenderWidgetHostViewAura::ExecuteEditingCommand(int command_id) { | 1661 void RenderWidgetHostViewAura::ExecuteEditingCommand(int command_id) { |
1660 } | 1662 } |
1661 | 1663 |
| 1664 void RenderWidgetHostViewAura::OnKeyboardBoundsUnchanged() { |
| 1665 host_->Send(new ViewMsg_FocusChangeComplete(host_->GetRoutingID())); |
| 1666 } |
| 1667 |
1662 //////////////////////////////////////////////////////////////////////////////// | 1668 //////////////////////////////////////////////////////////////////////////////// |
1663 // RenderWidgetHostViewAura, gfx::DisplayObserver implementation: | 1669 // RenderWidgetHostViewAura, gfx::DisplayObserver implementation: |
1664 | 1670 |
1665 void RenderWidgetHostViewAura::OnDisplayAdded( | 1671 void RenderWidgetHostViewAura::OnDisplayAdded( |
1666 const gfx::Display& new_display) { | 1672 const gfx::Display& new_display) { |
1667 } | 1673 } |
1668 | 1674 |
1669 void RenderWidgetHostViewAura::OnDisplayRemoved( | 1675 void RenderWidgetHostViewAura::OnDisplayRemoved( |
1670 const gfx::Display& old_display) { | 1676 const gfx::Display& old_display) { |
1671 } | 1677 } |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2568 | 2574 |
2569 //////////////////////////////////////////////////////////////////////////////// | 2575 //////////////////////////////////////////////////////////////////////////////// |
2570 // RenderWidgetHostViewBase, public: | 2576 // RenderWidgetHostViewBase, public: |
2571 | 2577 |
2572 // static | 2578 // static |
2573 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2579 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
2574 GetScreenInfoForWindow(results, NULL); | 2580 GetScreenInfoForWindow(results, NULL); |
2575 } | 2581 } |
2576 | 2582 |
2577 } // namespace content | 2583 } // namespace content |
OLD | NEW |