OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/render_view.h" | 5 #include "content/renderer/render_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 3959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3970 char_event.text[0] = text[i]; | 3970 char_event.text[0] = text[i]; |
3971 char_event.unmodifiedText[0] = text[i]; | 3971 char_event.unmodifiedText[0] = text[i]; |
3972 if (webwidget_) | 3972 if (webwidget_) |
3973 webwidget_->handleInputEvent(char_event); | 3973 webwidget_->handleInputEvent(char_event); |
3974 } | 3974 } |
3975 } else { | 3975 } else { |
3976 RenderWidget::OnImeConfirmComposition(text); | 3976 RenderWidget::OnImeConfirmComposition(text); |
3977 } | 3977 } |
3978 } | 3978 } |
3979 | 3979 |
3980 WebKit::WebTextInputType RenderView::GetTextInputType() { | 3980 ui::TextInputType RenderView::GetTextInputType() { |
3981 if (pepper_delegate_.IsPluginFocused()) { | 3981 if (pepper_delegate_.IsPluginFocused()) { |
3982 // TODO(kinaba) Until PPAPI has an interface for handling IME events, we | 3982 // TODO(kinaba) Until PPAPI has an interface for handling IME events, we |
3983 // consider all the parts of PPAPI plugins are accepting text inputs. | 3983 // consider all the parts of PPAPI plugins are accepting text inputs. |
3984 return WebKit::WebTextInputTypeText; | 3984 return ui::TEXT_INPUT_TYPE_TEXT; |
3985 } else { | |
3986 return RenderWidget::GetTextInputType(); | |
3987 } | 3985 } |
3986 return RenderWidget::GetTextInputType(); | |
3987 } | |
3988 | |
3989 bool RenderView::CanComposeInline() { | |
3990 if (pepper_delegate_.IsPluginFocused()) { | |
3991 // TODO(kinaba) Until PPAPI has an interface for handling IME events, we | |
3992 // consider all the parts of PPAPI plugins are accepting text inputs. | |
brettw
2011/06/16 17:39:43
I don't quite follow this comment. To me, consider
kochi
2011/06/17 03:47:21
Maybe like this:
Until PPAPI has an interface for
kinaba
2011/06/17 04:12:25
Done.
| |
3993 return false; | |
3994 } | |
3995 return true; | |
3988 } | 3996 } |
3989 | 3997 |
3990 #if defined(OS_MACOSX) | 3998 #if defined(OS_MACOSX) |
3991 void RenderView::PluginFocusChanged(bool focused, int plugin_id) { | 3999 void RenderView::PluginFocusChanged(bool focused, int plugin_id) { |
3992 IPC::Message* msg = new ViewHostMsg_PluginFocusChanged(routing_id(), | 4000 IPC::Message* msg = new ViewHostMsg_PluginFocusChanged(routing_id(), |
3993 focused, plugin_id); | 4001 focused, plugin_id); |
3994 Send(msg); | 4002 Send(msg); |
3995 } | 4003 } |
3996 | 4004 |
3997 void RenderView::StartPluginIme() { | 4005 void RenderView::StartPluginIme() { |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4242 const webkit_glue::CustomContextMenuContext& custom_context) { | 4250 const webkit_glue::CustomContextMenuContext& custom_context) { |
4243 if (custom_context.is_pepper_menu) | 4251 if (custom_context.is_pepper_menu) |
4244 pepper_delegate_.OnContextMenuClosed(custom_context); | 4252 pepper_delegate_.OnContextMenuClosed(custom_context); |
4245 else | 4253 else |
4246 context_menu_node_.reset(); | 4254 context_menu_node_.reset(); |
4247 } | 4255 } |
4248 | 4256 |
4249 void RenderView::OnNetworkStateChanged(bool online) { | 4257 void RenderView::OnNetworkStateChanged(bool online) { |
4250 WebNetworkStateNotifier::setOnLine(online); | 4258 WebNetworkStateNotifier::setOnLine(online); |
4251 } | 4259 } |
OLD | NEW |