Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: content/renderer/render_view.cc

Issue 7041003: Show composition text on IME panel when Pepper plugin is focused (Linux). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Separated the preedit-needed flag to a different enum. Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 { 3985 } else {
3986 return RenderWidget::GetTextInputType(); 3986 return RenderWidget::GetTextInputType();
3987 } 3987 }
3988 } 3988 }
3989 3989
3990 ui::TextInputPreeditType RenderView::GetTextInputPreeditType() {
3991 if (pepper_delegate_.IsPluginFocused()) {
3992 // TODO(kinaba) Until PPAPI has an interface for handling IME events, we
3993 // consider all the parts of PPAPI plugins are accepting text inputs.
3994 return ui::TEXT_INPUT_PREEDIT_ON_CANDIDATE_WINDOW;
3995 } else {
3996 return ui::TEXT_INPUT_PREEDIT_INLINE;
3997 }
3998 }
3999
3990 #if defined(OS_MACOSX) 4000 #if defined(OS_MACOSX)
3991 void RenderView::PluginFocusChanged(bool focused, int plugin_id) { 4001 void RenderView::PluginFocusChanged(bool focused, int plugin_id) {
3992 IPC::Message* msg = new ViewHostMsg_PluginFocusChanged(routing_id(), 4002 IPC::Message* msg = new ViewHostMsg_PluginFocusChanged(routing_id(),
3993 focused, plugin_id); 4003 focused, plugin_id);
3994 Send(msg); 4004 Send(msg);
3995 } 4005 }
3996 4006
3997 void RenderView::StartPluginIme() { 4007 void RenderView::StartPluginIme() {
3998 IPC::Message* msg = new ViewHostMsg_StartPluginIme(routing_id()); 4008 IPC::Message* msg = new ViewHostMsg_StartPluginIme(routing_id());
3999 // This message can be sent during event-handling, and needs to be delivered 4009 // This message can be sent during event-handling, and needs to be delivered
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
4242 const webkit_glue::CustomContextMenuContext& custom_context) { 4252 const webkit_glue::CustomContextMenuContext& custom_context) {
4243 if (custom_context.is_pepper_menu) 4253 if (custom_context.is_pepper_menu)
4244 pepper_delegate_.OnContextMenuClosed(custom_context); 4254 pepper_delegate_.OnContextMenuClosed(custom_context);
4245 else 4255 else
4246 context_menu_node_.reset(); 4256 context_menu_node_.reset();
4247 } 4257 }
4248 4258
4249 void RenderView::OnNetworkStateChanged(bool online) { 4259 void RenderView::OnNetworkStateChanged(bool online) {
4250 WebNetworkStateNotifier::setOnLine(online); 4260 WebNetworkStateNotifier::setOnLine(online);
4251 } 4261 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698