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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <utility> | 10 #include <utility> |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "content/child/child_process.h" | 26 #include "content/child/child_process.h" |
27 #include "content/child/child_shared_bitmap_manager.h" | 27 #include "content/child/child_shared_bitmap_manager.h" |
28 #include "content/child/npapi/npobject_proxy.h" | 28 #include "content/child/npapi/npobject_proxy.h" |
29 #include "content/child/npapi/npobject_stub.h" | 29 #include "content/child/npapi/npobject_stub.h" |
30 #include "content/child/npapi/npobject_util.h" | 30 #include "content/child/npapi/npobject_util.h" |
31 #include "content/child/npapi/webplugin_resource_client.h" | 31 #include "content/child/npapi/webplugin_resource_client.h" |
32 #include "content/child/plugin_messages.h" | 32 #include "content/child/plugin_messages.h" |
33 #include "content/common/content_constants_internal.h" | 33 #include "content/common/content_constants_internal.h" |
34 #include "content/common/cursors/webcursor.h" | 34 #include "content/common/cursors/webcursor.h" |
35 #include "content/common/frame_messages.h" | 35 #include "content/common/frame_messages.h" |
| 36 #include "content/common/text_input_state.h" |
36 #include "content/common/view_messages.h" | 37 #include "content/common/view_messages.h" |
37 #include "content/public/renderer/content_renderer_client.h" | 38 #include "content/public/renderer/content_renderer_client.h" |
38 #include "content/renderer/npapi/plugin_channel_host.h" | 39 #include "content/renderer/npapi/plugin_channel_host.h" |
39 #include "content/renderer/npapi/webplugin_impl.h" | 40 #include "content/renderer/npapi/webplugin_impl.h" |
40 #include "content/renderer/render_thread_impl.h" | 41 #include "content/renderer/render_thread_impl.h" |
41 #include "content/renderer/render_view_impl.h" | 42 #include "content/renderer/render_view_impl.h" |
42 #include "content/renderer/sad_plugin.h" | 43 #include "content/renderer/sad_plugin.h" |
43 #include "ipc/ipc_channel_handle.h" | 44 #include "ipc/ipc_channel_handle.h" |
44 #include "net/base/mime_util.h" | 45 #include "net/base/mime_util.h" |
45 #include "skia/ext/platform_canvas.h" | 46 #include "skia/ext/platform_canvas.h" |
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 | 754 |
754 modal_loop_pump_messages_event_.reset( | 755 modal_loop_pump_messages_event_.reset( |
755 new base::WaitableEvent(std::move(modal_loop_pump_messages_event))); | 756 new base::WaitableEvent(std::move(modal_loop_pump_messages_event))); |
756 } | 757 } |
757 | 758 |
758 void WebPluginDelegateProxy::OnNotifyIMEStatus(int input_type, | 759 void WebPluginDelegateProxy::OnNotifyIMEStatus(int input_type, |
759 const gfx::Rect& caret_rect) { | 760 const gfx::Rect& caret_rect) { |
760 if (!render_view_) | 761 if (!render_view_) |
761 return; | 762 return; |
762 | 763 |
763 ViewHostMsg_TextInputState_Params params; | 764 TextInputState params; |
764 params.type = static_cast<ui::TextInputType>(input_type); | 765 params.type = static_cast<ui::TextInputType>(input_type); |
765 params.mode = ui::TEXT_INPUT_MODE_DEFAULT; | 766 params.mode = ui::TEXT_INPUT_MODE_DEFAULT; |
766 params.can_compose_inline = true; | 767 params.can_compose_inline = true; |
767 render_view_->Send(new ViewHostMsg_TextInputStateChanged( | 768 render_view_->Send(new ViewHostMsg_TextInputStateChanged( |
768 render_view_->GetRoutingID(), params)); | 769 render_view_->GetRoutingID(), params)); |
769 | 770 |
770 ViewHostMsg_SelectionBounds_Params bounds_params; | 771 ViewHostMsg_SelectionBounds_Params bounds_params; |
771 bounds_params.anchor_rect = bounds_params.focus_rect = caret_rect; | 772 bounds_params.anchor_rect = bounds_params.focus_rect = caret_rect; |
772 bounds_params.anchor_dir = bounds_params.focus_dir = | 773 bounds_params.anchor_dir = bounds_params.focus_dir = |
773 blink::WebTextDirectionLeftToRight; | 774 blink::WebTextDirectionLeftToRight; |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 index->mime_type == "application/x-vnd.movenetworks.qm" || | 972 index->mime_type == "application/x-vnd.movenetworks.qm" || |
972 index->mime_type == "application/x-vnd.mnplayer.qm") { | 973 index->mime_type == "application/x-vnd.mnplayer.qm") { |
973 return true; | 974 return true; |
974 } | 975 } |
975 } | 976 } |
976 return false; | 977 return false; |
977 } | 978 } |
978 #endif | 979 #endif |
979 | 980 |
980 } // namespace content | 981 } // namespace content |
OLD | NEW |