| 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 <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 display::Screen::GetScreen()->GetDisplayNearestWindow(window_); | 970 display::Screen::GetScreen()->GetDisplayNearestWindow(window_); |
| 971 current_cursor_.SetDisplayInfo(display); | 971 current_cursor_.SetDisplayInfo(display); |
| 972 UpdateCursorIfOverSelf(); | 972 UpdateCursorIfOverSelf(); |
| 973 } | 973 } |
| 974 | 974 |
| 975 void RenderWidgetHostViewAura::SetIsLoading(bool is_loading) { | 975 void RenderWidgetHostViewAura::SetIsLoading(bool is_loading) { |
| 976 is_loading_ = is_loading; | 976 is_loading_ = is_loading; |
| 977 UpdateCursorIfOverSelf(); | 977 UpdateCursorIfOverSelf(); |
| 978 } | 978 } |
| 979 | 979 |
| 980 void RenderWidgetHostViewAura::ImeCancelComposition() { | |
| 981 if (GetInputMethod()) | |
| 982 GetInputMethod()->CancelComposition(this); | |
| 983 has_composition_text_ = false; | |
| 984 } | |
| 985 | |
| 986 void RenderWidgetHostViewAura::ImeCompositionRangeChanged( | 980 void RenderWidgetHostViewAura::ImeCompositionRangeChanged( |
| 987 const gfx::Range& range, | 981 const gfx::Range& range, |
| 988 const std::vector<gfx::Rect>& character_bounds) { | 982 const std::vector<gfx::Rect>& character_bounds) { |
| 989 composition_character_bounds_ = character_bounds; | 983 composition_character_bounds_ = character_bounds; |
| 990 } | 984 } |
| 991 | 985 |
| 992 void RenderWidgetHostViewAura::RenderProcessGone(base::TerminationStatus status, | 986 void RenderWidgetHostViewAura::RenderProcessGone(base::TerminationStatus status, |
| 993 int error_code) { | 987 int error_code) { |
| 994 UpdateCursorIfOverSelf(); | 988 UpdateCursorIfOverSelf(); |
| 995 Destroy(); | 989 Destroy(); |
| (...skipping 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3023 if (did_update_state) | 3017 if (did_update_state) |
| 3024 GetInputMethod()->OnTextInputTypeChanged(this); | 3018 GetInputMethod()->OnTextInputTypeChanged(this); |
| 3025 | 3019 |
| 3026 const TextInputState* state = text_input_manager_->GetTextInputState(); | 3020 const TextInputState* state = text_input_manager_->GetTextInputState(); |
| 3027 | 3021 |
| 3028 if (state && state->show_ime_if_needed && | 3022 if (state && state->show_ime_if_needed && |
| 3029 state->type != ui::TEXT_INPUT_TYPE_NONE) | 3023 state->type != ui::TEXT_INPUT_TYPE_NONE) |
| 3030 GetInputMethod()->ShowImeIfNeeded(); | 3024 GetInputMethod()->ShowImeIfNeeded(); |
| 3031 } | 3025 } |
| 3032 | 3026 |
| 3027 void RenderWidgetHostViewAura::OnImeCancelComposition( |
| 3028 TextInputManager* text_input_manager, |
| 3029 RenderWidgetHostViewBase* view) { |
| 3030 DCHECK_EQ(text_input_manager_->GetActiveWidget(), |
| 3031 view->GetRenderWidgetHost()); |
| 3032 if (GetInputMethod()) |
| 3033 GetInputMethod()->CancelComposition(this); |
| 3034 has_composition_text_ = false; |
| 3035 } |
| 3036 |
| 3033 //////////////////////////////////////////////////////////////////////////////// | 3037 //////////////////////////////////////////////////////////////////////////////// |
| 3034 // RenderWidgetHostViewBase, public: | 3038 // RenderWidgetHostViewBase, public: |
| 3035 | 3039 |
| 3036 // static | 3040 // static |
| 3037 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 3041 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 3038 GetScreenInfoForWindow(results, NULL); | 3042 GetScreenInfoForWindow(results, NULL); |
| 3039 } | 3043 } |
| 3040 | 3044 |
| 3041 } // namespace content | 3045 } // namespace content |
| OLD | NEW |