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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_mac.mm

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: A todo comment is reworded to be more correct. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/render_widget_host_view_mac.mm
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
index f0d25f955ce121eac79a690c4766e949930b13ee..912f037a2a209694a6027d02d1bfcb3c9d0ff4ab 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
@@ -232,7 +232,7 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget)
: render_widget_host_(widget),
about_to_validate_and_paint_(false),
call_set_needs_display_in_rect_pending_(false),
- text_input_type_(WebKit::WebTextInputTypeNone),
+ text_input_type_(ui::TEXT_INPUT_TYPE_NONE),
spellcheck_enabled_(false),
spellcheck_checked_(false),
is_loading_(false),
@@ -490,8 +490,13 @@ void RenderWidgetHostViewMac::SetIsLoading(bool is_loading) {
}
void RenderWidgetHostViewMac::ImeUpdateTextInputState(
- WebKit::WebTextInputType type,
+ ui::TextInputType type,
+ bool can_compose_inline,
const gfx::Rect& caret_rect) {
+ // TODO(kinaba): currently, can_compose_inline is ignored and always treated
+ // as true. We need to support "can_compose_inline=false" for PPAPI plugins
+ // that may want to avoid drawing composition-text by themselves and pass
+ // the responsibility to the browser.
if (text_input_type_ != type) {
text_input_type_ = type;
if (HasFocus()) {
@@ -1029,12 +1034,12 @@ void RenderWidgetHostViewMac::OnAccessibilityNotifications(
void RenderWidgetHostViewMac::SetTextInputActive(bool active) {
if (active) {
- if (text_input_type_ == WebKit::WebTextInputTypePassword)
+ if (text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD)
EnablePasswordInput();
else
DisablePasswordInput();
} else {
- if (text_input_type_ == WebKit::WebTextInputTypePassword)
+ if (text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD)
DisablePasswordInput();
}
}
@@ -2238,8 +2243,8 @@ extern NSString *NSTextInputReplacementRangeAttributeName;
return [[ComplexTextInputPanel sharedComplexTextInputPanel] inputContext];
switch(renderWidgetHostView_->text_input_type_) {
- case WebKit::WebTextInputTypeNone:
- case WebKit::WebTextInputTypePassword:
+ case ui::TEXT_INPUT_TYPE_NONE:
+ case ui::TEXT_INPUT_TYPE_PASSWORD:
return nil;
default:
return [super inputContext];
@@ -2530,7 +2535,7 @@ extern NSString *NSTextInputReplacementRangeAttributeName;
BOOL returnTypeIsString = [returnType isEqual:NSStringPboardType];
BOOL hasText = !renderWidgetHostView_->selected_text().empty();
BOOL takesText =
- renderWidgetHostView_->text_input_type_ != WebKit::WebTextInputTypeNone;
+ renderWidgetHostView_->text_input_type_ != ui::TEXT_INPUT_TYPE_NONE;
if (sendTypeIsString && hasText && !returnType) {
requestor = self;

Powered by Google App Engine
This is Rietveld 408576698