OLD | NEW |
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 2242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2253 SimulateImeSetCompositionEvent(input_event); | 2253 SimulateImeSetCompositionEvent(input_event); |
2254 break; | 2254 break; |
2255 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_END: | 2255 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_END: |
2256 DCHECK(input_event.character_text.empty()); | 2256 DCHECK(input_event.character_text.empty()); |
2257 SimulateImeSetCompositionEvent(input_event); | 2257 SimulateImeSetCompositionEvent(input_event); |
2258 break; | 2258 break; |
2259 case PP_INPUTEVENT_TYPE_IME_TEXT: | 2259 case PP_INPUTEVENT_TYPE_IME_TEXT: |
2260 if (!render_frame_) | 2260 if (!render_frame_) |
2261 return false; | 2261 return false; |
2262 render_frame_->SimulateImeCommitText( | 2262 render_frame_->SimulateImeCommitText( |
2263 base::UTF8ToUTF16(input_event.character_text), gfx::Range()); | 2263 base::UTF8ToUTF16(input_event.character_text), |
| 2264 std::vector<blink::WebCompositionUnderline>(), gfx::Range()); |
2264 break; | 2265 break; |
2265 default: | 2266 default: |
2266 return false; | 2267 return false; |
2267 } | 2268 } |
2268 return true; | 2269 return true; |
2269 } | 2270 } |
2270 | 2271 |
2271 void PepperPluginInstanceImpl::SimulateImeSetCompositionEvent( | 2272 void PepperPluginInstanceImpl::SimulateImeSetCompositionEvent( |
2272 const InputEventData& input_event) { | 2273 const InputEventData& input_event) { |
2273 if (!render_frame_) | 2274 if (!render_frame_) |
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3464 const cc::TextureMailbox& mailbox) const { | 3465 const cc::TextureMailbox& mailbox) const { |
3465 auto it = | 3466 auto it = |
3466 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), | 3467 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), |
3467 [&mailbox](const TextureMailboxRefCount& ref_count) { | 3468 [&mailbox](const TextureMailboxRefCount& ref_count) { |
3468 return ref_count.first.mailbox() == mailbox.mailbox(); | 3469 return ref_count.first.mailbox() == mailbox.mailbox(); |
3469 }); | 3470 }); |
3470 return it != texture_ref_counts_.end(); | 3471 return it != texture_ref_counts_.end(); |
3471 } | 3472 } |
3472 | 3473 |
3473 } // namespace content | 3474 } // namespace content |
OLD | NEW |