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

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

Issue 2568093003: Support parsing BackgroundSpans and UnderlineSpans in Android IME's commitText() (Closed)
Patch Set: Fix header include Created 3 years, 12 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 unified diff | Download patch
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 2234 matching lines...) Expand 10 before | Expand all | Expand 10 after
2245 SimulateImeSetCompositionEvent(input_event); 2245 SimulateImeSetCompositionEvent(input_event);
2246 break; 2246 break;
2247 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_END: 2247 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_END:
2248 DCHECK(input_event.character_text.empty()); 2248 DCHECK(input_event.character_text.empty());
2249 SimulateImeSetCompositionEvent(input_event); 2249 SimulateImeSetCompositionEvent(input_event);
2250 break; 2250 break;
2251 case PP_INPUTEVENT_TYPE_IME_TEXT: 2251 case PP_INPUTEVENT_TYPE_IME_TEXT:
2252 if (!render_frame_) 2252 if (!render_frame_)
2253 return false; 2253 return false;
2254 render_frame_->SimulateImeCommitText( 2254 render_frame_->SimulateImeCommitText(
2255 base::UTF8ToUTF16(input_event.character_text), gfx::Range()); 2255 base::UTF8ToUTF16(input_event.character_text),
2256 std::vector<blink::WebCompositionUnderline>(), gfx::Range());
2256 break; 2257 break;
2257 default: 2258 default:
2258 return false; 2259 return false;
2259 } 2260 }
2260 return true; 2261 return true;
2261 } 2262 }
2262 2263
2263 void PepperPluginInstanceImpl::SimulateImeSetCompositionEvent( 2264 void PepperPluginInstanceImpl::SimulateImeSetCompositionEvent(
2264 const InputEventData& input_event) { 2265 const InputEventData& input_event) {
2265 if (!render_frame_) 2266 if (!render_frame_)
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
3456 const cc::TextureMailbox& mailbox) const { 3457 const cc::TextureMailbox& mailbox) const {
3457 auto it = 3458 auto it =
3458 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), 3459 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(),
3459 [&mailbox](const TextureMailboxRefCount& ref_count) { 3460 [&mailbox](const TextureMailboxRefCount& ref_count) {
3460 return ref_count.first.mailbox() == mailbox.mailbox(); 3461 return ref_count.first.mailbox() == mailbox.mailbox();
3461 }); 3462 });
3462 return it != texture_ref_counts_.end(); 3463 return it != texture_ref_counts_.end();
3463 } 3464 }
3464 3465
3465 } // namespace content 3466 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698