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 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 range.set_start(location); | 1141 range.set_start(location); |
1142 range.set_end(location + length); | 1142 range.set_end(location + length); |
1143 } | 1143 } |
1144 Send(new ViewHostMsg_ImeCompositionRangeChanged(routing_id(), range)); | 1144 Send(new ViewHostMsg_ImeCompositionRangeChanged(routing_id(), range)); |
1145 } | 1145 } |
1146 } | 1146 } |
1147 | 1147 |
1148 void RenderWidget::OnImeConfirmComposition( | 1148 void RenderWidget::OnImeConfirmComposition( |
1149 const string16& text, const ui::Range& replacement_range) { | 1149 const string16& text, const ui::Range& replacement_range) { |
1150 if (webwidget_) { | 1150 if (webwidget_) { |
| 1151 handling_input_event_ = true; |
1151 webwidget_->confirmComposition(text); | 1152 webwidget_->confirmComposition(text); |
| 1153 handling_input_event_ = false; |
1152 } | 1154 } |
1153 // Send an updated IME range with just the caret range. | 1155 // Send an updated IME range with just the caret range. |
1154 ui::Range range(ui::Range::InvalidRange()); | 1156 ui::Range range(ui::Range::InvalidRange()); |
1155 size_t location, length; | 1157 size_t location, length; |
1156 if (webwidget_->caretOrSelectionRange(&location, &length)) { | 1158 if (webwidget_->caretOrSelectionRange(&location, &length)) { |
1157 range.set_start(location); | 1159 range.set_start(location); |
1158 range.set_end(location + length); | 1160 range.set_end(location + length); |
1159 } | 1161 } |
1160 Send(new ViewHostMsg_ImeCompositionRangeChanged(routing_id(), range)); | 1162 Send(new ViewHostMsg_ImeCompositionRangeChanged(routing_id(), range)); |
1161 } | 1163 } |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1440 } | 1442 } |
1441 } | 1443 } |
1442 | 1444 |
1443 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { | 1445 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { |
1444 return false; | 1446 return false; |
1445 } | 1447 } |
1446 | 1448 |
1447 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 1449 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
1448 return false; | 1450 return false; |
1449 } | 1451 } |
OLD | NEW |