| 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 2224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2235 if (handled) | 2235 if (handled) |
| 2236 return; | 2236 return; |
| 2237 | 2237 |
| 2238 std::vector<std::unique_ptr<WebInputEvent>> events = | 2238 std::vector<std::unique_ptr<WebInputEvent>> events = |
| 2239 CreateSimulatedWebInputEvents( | 2239 CreateSimulatedWebInputEvents( |
| 2240 input_event, view_data_.rect.point.x + view_data_.rect.size.width / 2, | 2240 input_event, view_data_.rect.point.x + view_data_.rect.size.width / 2, |
| 2241 view_data_.rect.point.y + view_data_.rect.size.height / 2); | 2241 view_data_.rect.point.y + view_data_.rect.size.height / 2); |
| 2242 for (std::vector<std::unique_ptr<WebInputEvent>>::iterator it = | 2242 for (std::vector<std::unique_ptr<WebInputEvent>>::iterator it = |
| 2243 events.begin(); | 2243 events.begin(); |
| 2244 it != events.end(); ++it) { | 2244 it != events.end(); ++it) { |
| 2245 widget->handleInputEvent(*it->get()); | 2245 widget->handleInputEvent(blink::WebCoalescedInputEvent(*it->get())); |
| 2246 } | 2246 } |
| 2247 } | 2247 } |
| 2248 | 2248 |
| 2249 bool PepperPluginInstanceImpl::SimulateIMEEvent( | 2249 bool PepperPluginInstanceImpl::SimulateIMEEvent( |
| 2250 const InputEventData& input_event) { | 2250 const InputEventData& input_event) { |
| 2251 switch (input_event.event_type) { | 2251 switch (input_event.event_type) { |
| 2252 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_START: | 2252 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_START: |
| 2253 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_UPDATE: | 2253 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_UPDATE: |
| 2254 SimulateImeSetCompositionEvent(input_event); | 2254 SimulateImeSetCompositionEvent(input_event); |
| 2255 break; | 2255 break; |
| (...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3466 const cc::TextureMailbox& mailbox) const { | 3466 const cc::TextureMailbox& mailbox) const { |
| 3467 auto it = | 3467 auto it = |
| 3468 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), | 3468 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), |
| 3469 [&mailbox](const TextureMailboxRefCount& ref_count) { | 3469 [&mailbox](const TextureMailboxRefCount& ref_count) { |
| 3470 return ref_count.first.mailbox() == mailbox.mailbox(); | 3470 return ref_count.first.mailbox() == mailbox.mailbox(); |
| 3471 }); | 3471 }); |
| 3472 return it != texture_ref_counts_.end(); | 3472 return it != texture_ref_counts_.end(); |
| 3473 } | 3473 } |
| 3474 | 3474 |
| 3475 } // namespace content | 3475 } // namespace content |
| OLD | NEW |