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_widget.h" | 5 #include "content/renderer/render_widget.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1148 range.set_start(location); | 1148 range.set_start(location); |
1149 range.set_end(location + length); | 1149 range.set_end(location + length); |
1150 } | 1150 } |
1151 Send(new ViewHostMsg_ImeCompositionRangeChanged(routing_id(), range)); | 1151 Send(new ViewHostMsg_ImeCompositionRangeChanged(routing_id(), range)); |
1152 } | 1152 } |
1153 } | 1153 } |
1154 | 1154 |
1155 void RenderWidget::OnImeConfirmComposition( | 1155 void RenderWidget::OnImeConfirmComposition( |
1156 const string16& text, const ui::Range& replacement_range) { | 1156 const string16& text, const ui::Range& replacement_range) { |
1157 if (webwidget_) { | 1157 if (webwidget_) { |
| 1158 handling_input_event_ = true; |
1158 webwidget_->confirmComposition(text); | 1159 webwidget_->confirmComposition(text); |
| 1160 handling_input_event_ = false; |
1159 } | 1161 } |
1160 // Send an updated IME range with just the caret range. | 1162 // Send an updated IME range with just the caret range. |
1161 ui::Range range(ui::Range::InvalidRange()); | 1163 ui::Range range(ui::Range::InvalidRange()); |
1162 size_t location, length; | 1164 size_t location, length; |
1163 if (webwidget_->caretOrSelectionRange(&location, &length)) { | 1165 if (webwidget_->caretOrSelectionRange(&location, &length)) { |
1164 range.set_start(location); | 1166 range.set_start(location); |
1165 range.set_end(location + length); | 1167 range.set_end(location + length); |
1166 } | 1168 } |
1167 Send(new ViewHostMsg_ImeCompositionRangeChanged(routing_id(), range)); | 1169 Send(new ViewHostMsg_ImeCompositionRangeChanged(routing_id(), range)); |
1168 } | 1170 } |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1473 } | 1475 } |
1474 } | 1476 } |
1475 | 1477 |
1476 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { | 1478 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { |
1477 return false; | 1479 return false; |
1478 } | 1480 } |
1479 | 1481 |
1480 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 1482 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
1481 return false; | 1483 return false; |
1482 } | 1484 } |
OLD | NEW |