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/renderer/npapi/webplugin_delegate_proxy.h" | 5 #include "content/renderer/npapi/webplugin_delegate_proxy.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
910 | 910 |
911 modal_loop_pump_messages_event_.reset( | 911 modal_loop_pump_messages_event_.reset( |
912 new base::WaitableEvent(modal_loop_pump_messages_event)); | 912 new base::WaitableEvent(modal_loop_pump_messages_event)); |
913 } | 913 } |
914 | 914 |
915 void WebPluginDelegateProxy::OnNotifyIMEStatus(int input_type, | 915 void WebPluginDelegateProxy::OnNotifyIMEStatus(int input_type, |
916 const gfx::Rect& caret_rect) { | 916 const gfx::Rect& caret_rect) { |
917 if (!render_view_) | 917 if (!render_view_) |
918 return; | 918 return; |
919 | 919 |
920 render_view_->Send(new ViewHostMsg_TextInputTypeChanged( | 920 ViewHostMsg_TextInputState_Params p; |
921 render_view_->routing_id(), | 921 p.type = static_cast<ui::TextInputType>(input_type); |
922 static_cast<ui::TextInputType>(input_type), | 922 p.mode = ui::TEXT_INPUT_MODE_DEFAULT; |
923 ui::TEXT_INPUT_MODE_DEFAULT, | 923 p.can_compose_inline = true; |
924 true)); | 924 |
| 925 render_view_->Send(new ViewHostMsg_TextInputStateChanged( |
| 926 render_view_->routing_id(), p)); |
925 | 927 |
926 ViewHostMsg_SelectionBounds_Params bounds_params; | 928 ViewHostMsg_SelectionBounds_Params bounds_params; |
927 bounds_params.anchor_rect = bounds_params.focus_rect = caret_rect; | 929 bounds_params.anchor_rect = bounds_params.focus_rect = caret_rect; |
928 bounds_params.anchor_dir = bounds_params.focus_dir = | 930 bounds_params.anchor_dir = bounds_params.focus_dir = |
929 blink::WebTextDirectionLeftToRight; | 931 blink::WebTextDirectionLeftToRight; |
930 bounds_params.is_anchor_first = true; | 932 bounds_params.is_anchor_first = true; |
931 render_view_->Send(new ViewHostMsg_SelectionBoundsChanged( | 933 render_view_->Send(new ViewHostMsg_SelectionBoundsChanged( |
932 render_view_->routing_id(), | 934 render_view_->routing_id(), |
933 bounds_params)); | 935 bounds_params)); |
934 } | 936 } |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1234 | 1236 |
1235 plugin_->URLRedirectResponse(allow, resource_id); | 1237 plugin_->URLRedirectResponse(allow, resource_id); |
1236 } | 1238 } |
1237 | 1239 |
1238 void WebPluginDelegateProxy::OnCheckIfRunInsecureContent(const GURL& url, | 1240 void WebPluginDelegateProxy::OnCheckIfRunInsecureContent(const GURL& url, |
1239 bool* result) { | 1241 bool* result) { |
1240 *result = plugin_->CheckIfRunInsecureContent(url); | 1242 *result = plugin_->CheckIfRunInsecureContent(url); |
1241 } | 1243 } |
1242 | 1244 |
1243 } // namespace content | 1245 } // namespace content |
OLD | NEW |