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 27 matching lines...) Expand all Loading... |
38 #include "content/browser/renderer_host/overscroll_controller.h" | 38 #include "content/browser/renderer_host/overscroll_controller.h" |
39 #include "content/browser/renderer_host/render_view_host_delegate.h" | 39 #include "content/browser/renderer_host/render_view_host_delegate.h" |
40 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 40 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
41 #include "content/browser/renderer_host/render_view_host_impl.h" | 41 #include "content/browser/renderer_host/render_view_host_impl.h" |
42 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 42 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
43 #include "content/browser/renderer_host/render_widget_host_impl.h" | 43 #include "content/browser/renderer_host/render_widget_host_impl.h" |
44 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" | 44 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" |
45 #include "content/browser/renderer_host/ui_events_helper.h" | 45 #include "content/browser/renderer_host/ui_events_helper.h" |
46 #include "content/browser/renderer_host/web_input_event_aura.h" | 46 #include "content/browser/renderer_host/web_input_event_aura.h" |
47 #include "content/common/content_switches_internal.h" | 47 #include "content/common/content_switches_internal.h" |
| 48 #include "content/common/input_messages.h" |
48 #include "content/common/site_isolation_policy.h" | 49 #include "content/common/site_isolation_policy.h" |
49 #include "content/common/text_input_state.h" | 50 #include "content/common/text_input_state.h" |
50 #include "content/common/view_messages.h" | 51 #include "content/common/view_messages.h" |
51 #include "content/public/browser/content_browser_client.h" | 52 #include "content/public/browser/content_browser_client.h" |
52 #include "content/public/browser/overscroll_configuration.h" | 53 #include "content/public/browser/overscroll_configuration.h" |
53 #include "content/public/browser/render_view_host.h" | 54 #include "content/public/browser/render_view_host.h" |
54 #include "content/public/browser/render_widget_host_view_frame_subscriber.h" | 55 #include "content/public/browser/render_widget_host_view_frame_subscriber.h" |
55 #include "content/public/browser/user_metrics.h" | 56 #include "content/public/browser/user_metrics.h" |
56 #include "content/public/common/content_switches.h" | 57 #include "content/public/common/content_switches.h" |
57 #include "gpu/ipc/common/gpu_messages.h" | 58 #include "gpu/ipc/common/gpu_messages.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 #include "content/browser/accessibility/browser_accessibility_win.h" | 101 #include "content/browser/accessibility/browser_accessibility_win.h" |
101 #include "content/browser/renderer_host/legacy_render_widget_host_win.h" | 102 #include "content/browser/renderer_host/legacy_render_widget_host_win.h" |
102 #include "ui/base/win/hidden_window.h" | 103 #include "ui/base/win/hidden_window.h" |
103 #include "ui/base/win/osk_display_manager.h" | 104 #include "ui/base/win/osk_display_manager.h" |
104 #include "ui/base/win/osk_display_observer.h" | 105 #include "ui/base/win/osk_display_observer.h" |
105 #include "ui/display/win/screen_win.h" | 106 #include "ui/display/win/screen_win.h" |
106 #include "ui/gfx/gdi_util.h" | 107 #include "ui/gfx/gdi_util.h" |
107 #endif | 108 #endif |
108 | 109 |
109 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 110 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
110 #include "content/common/input_messages.h" | |
111 #include "ui/base/ime/linux/text_edit_command_auralinux.h" | 111 #include "ui/base/ime/linux/text_edit_command_auralinux.h" |
112 #include "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h" | 112 #include "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h" |
113 #endif | 113 #endif |
114 | 114 |
115 using gfx::RectToSkIRect; | 115 using gfx::RectToSkIRect; |
116 using gfx::SkIRectToRect; | 116 using gfx::SkIRectToRect; |
117 | 117 |
118 using blink::WebScreenInfo; | 118 using blink::WebScreenInfo; |
119 using blink::WebInputEvent; | 119 using blink::WebInputEvent; |
120 using blink::WebGestureEvent; | 120 using blink::WebGestureEvent; |
(...skipping 2868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2989 | 2989 |
2990 if (!GetInputMethod()) | 2990 if (!GetInputMethod()) |
2991 return; | 2991 return; |
2992 | 2992 |
2993 if (did_update_state) | 2993 if (did_update_state) |
2994 GetInputMethod()->OnTextInputTypeChanged(this); | 2994 GetInputMethod()->OnTextInputTypeChanged(this); |
2995 | 2995 |
2996 const TextInputState* state = text_input_manager_->GetTextInputState(); | 2996 const TextInputState* state = text_input_manager_->GetTextInputState(); |
2997 | 2997 |
2998 if (state && state->show_ime_if_needed && | 2998 if (state && state->show_ime_if_needed && |
2999 state->type != ui::TEXT_INPUT_TYPE_NONE) | 2999 state->type != ui::TEXT_INPUT_TYPE_NONE) { |
3000 GetInputMethod()->ShowImeIfNeeded(); | 3000 GetInputMethod()->ShowImeIfNeeded(); |
| 3001 |
| 3002 // Start monitoring the composition information if the focused node is |
| 3003 // editable. |
| 3004 host_->Send(new InputMsg_RequestCompositionUpdate( |
| 3005 host_->GetRoutingID(), |
| 3006 false /* immediate request */, |
| 3007 true /* monitor request */)); |
| 3008 } else { |
| 3009 // Stop monitoring the composition information if the focused node is not |
| 3010 // editable. |
| 3011 host_->Send(new InputMsg_RequestCompositionUpdate( |
| 3012 host_->GetRoutingID(), |
| 3013 false /* immediate request */, |
| 3014 false /* monitor request */)); |
| 3015 } |
3001 } | 3016 } |
3002 | 3017 |
3003 void RenderWidgetHostViewAura::OnImeCancelComposition( | 3018 void RenderWidgetHostViewAura::OnImeCancelComposition( |
3004 TextInputManager* text_input_manager, | 3019 TextInputManager* text_input_manager, |
3005 RenderWidgetHostViewBase* view) { | 3020 RenderWidgetHostViewBase* view) { |
3006 // |view| is not necessarily the one corresponding to | 3021 // |view| is not necessarily the one corresponding to |
3007 // TextInputManager::GetActiveWidget() as RenderWidgetHostViewAura can call | 3022 // TextInputManager::GetActiveWidget() as RenderWidgetHostViewAura can call |
3008 // this method to finish any ongoing composition in response to a mouse down | 3023 // this method to finish any ongoing composition in response to a mouse down |
3009 // event. | 3024 // event. |
3010 if (GetInputMethod()) | 3025 if (GetInputMethod()) |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3049 | 3064 |
3050 //////////////////////////////////////////////////////////////////////////////// | 3065 //////////////////////////////////////////////////////////////////////////////// |
3051 // RenderWidgetHostViewBase, public: | 3066 // RenderWidgetHostViewBase, public: |
3052 | 3067 |
3053 // static | 3068 // static |
3054 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 3069 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
3055 GetScreenInfoForWindow(results, NULL); | 3070 GetScreenInfoForWindow(results, NULL); |
3056 } | 3071 } |
3057 | 3072 |
3058 } // namespace content | 3073 } // namespace content |
OLD | NEW |