OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1331 if (!pepper_composition_text_.empty()) { | 1331 if (!pepper_composition_text_.empty()) { |
1332 focused_pepper_plugin_->HandleCompositionUpdate( | 1332 focused_pepper_plugin_->HandleCompositionUpdate( |
1333 pepper_composition_text_, underlines, selection_start, selection_end); | 1333 pepper_composition_text_, underlines, selection_start, selection_end); |
1334 } | 1334 } |
1335 } | 1335 } |
1336 } | 1336 } |
1337 | 1337 |
1338 void RenderFrameImpl::OnImeConfirmComposition( | 1338 void RenderFrameImpl::OnImeConfirmComposition( |
1339 const base::string16& text, | 1339 const base::string16& text, |
1340 const gfx::Range& replacement_range, | 1340 const gfx::Range& replacement_range, |
1341 bool keep_selection) { | 1341 bool keep_selection, |
| 1342 int newCursorPosition) { |
1342 // When a PPAPI plugin has focus, we bypass WebKit. | 1343 // When a PPAPI plugin has focus, we bypass WebKit. |
1343 // Here, text.empty() has a special meaning. It means to commit the last | 1344 // Here, text.empty() has a special meaning. It means to commit the last |
1344 // update of composition text (see | 1345 // update of composition text (see |
1345 // RenderWidgetHost::ImeConfirmComposition()). | 1346 // RenderWidgetHost::ImeConfirmComposition()). |
1346 const base::string16& last_text = text.empty() ? pepper_composition_text_ | 1347 const base::string16& last_text = text.empty() ? pepper_composition_text_ |
1347 : text; | 1348 : text; |
1348 | 1349 |
1349 // last_text is empty only when both text and pepper_composition_text_ is. | 1350 // last_text is empty only when both text and pepper_composition_text_ is. |
1350 // Ignore it. | 1351 // Ignore it. |
1351 if (last_text.empty()) | 1352 if (last_text.empty()) |
(...skipping 4805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6157 // event target. Potentially a Pepper plugin will receive the event. | 6158 // event target. Potentially a Pepper plugin will receive the event. |
6158 // In order to tell whether a plugin gets the last mouse event and which it | 6159 // In order to tell whether a plugin gets the last mouse event and which it |
6159 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6160 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6160 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6161 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6161 // |pepper_last_mouse_event_target_|. | 6162 // |pepper_last_mouse_event_target_|. |
6162 pepper_last_mouse_event_target_ = nullptr; | 6163 pepper_last_mouse_event_target_ = nullptr; |
6163 #endif | 6164 #endif |
6164 } | 6165 } |
6165 | 6166 |
6166 } // namespace content | 6167 } // namespace content |
OLD | NEW |