Chromium Code Reviews

Side by Side Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 2339793002: Handle newCursorPosition correctly for Android's commitText() (Closed)
Patch Set: Fix compile error (rebased on r418371) Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.cc ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/pepper/pepper_plugin_instance_impl.h" 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bit_cast.h" 10 #include "base/bit_cast.h"
(...skipping 2223 matching lines...)
2234 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_UPDATE: 2234 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_UPDATE:
2235 SimulateImeSetCompositionEvent(input_event); 2235 SimulateImeSetCompositionEvent(input_event);
2236 break; 2236 break;
2237 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_END: 2237 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_END:
2238 DCHECK(input_event.character_text.empty()); 2238 DCHECK(input_event.character_text.empty());
2239 SimulateImeSetCompositionEvent(input_event); 2239 SimulateImeSetCompositionEvent(input_event);
2240 break; 2240 break;
2241 case PP_INPUTEVENT_TYPE_IME_TEXT: 2241 case PP_INPUTEVENT_TYPE_IME_TEXT:
2242 if (!render_frame_) 2242 if (!render_frame_)
2243 return false; 2243 return false;
2244 render_frame_->SimulateImeConfirmComposition( 2244 render_frame_->SimulateImeCommitText(
2245 base::UTF8ToUTF16(input_event.character_text), gfx::Range()); 2245 base::UTF8ToUTF16(input_event.character_text), gfx::Range());
2246 break; 2246 break;
2247 default: 2247 default:
2248 return false; 2248 return false;
2249 } 2249 }
2250 return true; 2250 return true;
2251 } 2251 }
2252 2252
2253 void PepperPluginInstanceImpl::SimulateImeSetCompositionEvent( 2253 void PepperPluginInstanceImpl::SimulateImeSetCompositionEvent(
2254 const InputEventData& input_event) { 2254 const InputEventData& input_event) {
(...skipping 1191 matching lines...)
3446 const cc::TextureMailbox& mailbox) const { 3446 const cc::TextureMailbox& mailbox) const {
3447 auto it = 3447 auto it =
3448 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), 3448 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(),
3449 [&mailbox](const TextureMailboxRefCount& ref_count) { 3449 [&mailbox](const TextureMailboxRefCount& ref_count) {
3450 return ref_count.first.mailbox() == mailbox.mailbox(); 3450 return ref_count.first.mailbox() == mailbox.mailbox();
3451 }); 3451 });
3452 return it != texture_ref_counts_.end(); 3452 return it != texture_ref_counts_.end();
3453 } 3453 }
3454 3454
3455 } // namespace content 3455 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.cc ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine