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

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

Issue 1999423002: tyrbot test for commitText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SetHasCompositionTextToTrue Created 4 years, 3 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
« 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 2221 matching lines...) Expand 10 before | Expand all | Expand 10 after
2232 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_UPDATE: 2232 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_UPDATE:
2233 SimulateImeSetCompositionEvent(input_event); 2233 SimulateImeSetCompositionEvent(input_event);
2234 break; 2234 break;
2235 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_END: 2235 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_END:
2236 DCHECK(input_event.character_text.empty()); 2236 DCHECK(input_event.character_text.empty());
2237 SimulateImeSetCompositionEvent(input_event); 2237 SimulateImeSetCompositionEvent(input_event);
2238 break; 2238 break;
2239 case PP_INPUTEVENT_TYPE_IME_TEXT: 2239 case PP_INPUTEVENT_TYPE_IME_TEXT:
2240 if (!render_frame_) 2240 if (!render_frame_)
2241 return false; 2241 return false;
2242 render_frame_->SimulateImeConfirmComposition( 2242 render_frame_->SimulateImeCommitText(
2243 base::UTF8ToUTF16(input_event.character_text), gfx::Range()); 2243 base::UTF8ToUTF16(input_event.character_text), gfx::Range());
2244 break; 2244 break;
2245 default: 2245 default:
2246 return false; 2246 return false;
2247 } 2247 }
2248 return true; 2248 return true;
2249 } 2249 }
2250 2250
2251 void PepperPluginInstanceImpl::SimulateImeSetCompositionEvent( 2251 void PepperPluginInstanceImpl::SimulateImeSetCompositionEvent(
2252 const InputEventData& input_event) { 2252 const InputEventData& input_event) {
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
3444 const cc::TextureMailbox& mailbox) const { 3444 const cc::TextureMailbox& mailbox) const {
3445 auto it = 3445 auto it =
3446 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), 3446 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(),
3447 [&mailbox](const TextureMailboxRefCount& ref_count) { 3447 [&mailbox](const TextureMailboxRefCount& ref_count) {
3448 return ref_count.first.mailbox() == mailbox.mailbox(); 3448 return ref_count.first.mailbox() == mailbox.mailbox();
3449 }); 3449 });
3450 return it != texture_ref_counts_.end(); 3450 return it != texture_ref_counts_.end();
3451 } 3451 }
3452 3452
3453 } // namespace content 3453 } // 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
This is Rietveld 408576698