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

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

Issue 2479123003: WIP Add getCoalescedEvents API using vector of WebInputEvents (Closed)
Patch Set: Created 4 years, 1 month 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 2194 matching lines...) Expand 10 before | Expand all | Expand 10 after
2205 if (handled) 2205 if (handled)
2206 return; 2206 return;
2207 2207
2208 std::vector<std::unique_ptr<WebInputEvent>> events = 2208 std::vector<std::unique_ptr<WebInputEvent>> events =
2209 CreateSimulatedWebInputEvents( 2209 CreateSimulatedWebInputEvents(
2210 input_event, view_data_.rect.point.x + view_data_.rect.size.width / 2, 2210 input_event, view_data_.rect.point.x + view_data_.rect.size.width / 2,
2211 view_data_.rect.point.y + view_data_.rect.size.height / 2); 2211 view_data_.rect.point.y + view_data_.rect.size.height / 2);
2212 for (std::vector<std::unique_ptr<WebInputEvent>>::iterator it = 2212 for (std::vector<std::unique_ptr<WebInputEvent>>::iterator it =
2213 events.begin(); 2213 events.begin();
2214 it != events.end(); ++it) { 2214 it != events.end(); ++it) {
2215 widget->handleInputEvent(*it->get()); 2215 widget->handleInputEvent(*it->get(), std::vector<const WebInputEvent*>());
2216 } 2216 }
2217 } 2217 }
2218 2218
2219 bool PepperPluginInstanceImpl::SimulateIMEEvent( 2219 bool PepperPluginInstanceImpl::SimulateIMEEvent(
2220 const InputEventData& input_event) { 2220 const InputEventData& input_event) {
2221 switch (input_event.event_type) { 2221 switch (input_event.event_type) {
2222 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_START: 2222 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_START:
2223 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_UPDATE: 2223 case PP_INPUTEVENT_TYPE_IME_COMPOSITION_UPDATE:
2224 SimulateImeSetCompositionEvent(input_event); 2224 SimulateImeSetCompositionEvent(input_event);
2225 break; 2225 break;
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after
3435 const cc::TextureMailbox& mailbox) const { 3435 const cc::TextureMailbox& mailbox) const {
3436 auto it = 3436 auto it =
3437 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), 3437 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(),
3438 [&mailbox](const TextureMailboxRefCount& ref_count) { 3438 [&mailbox](const TextureMailboxRefCount& ref_count) {
3439 return ref_count.first.mailbox() == mailbox.mailbox(); 3439 return ref_count.first.mailbox() == mailbox.mailbox();
3440 }); 3440 });
3441 return it != texture_ref_counts_.end(); 3441 return it != texture_ref_counts_.end();
3442 } 3442 }
3443 3443
3444 } // namespace content 3444 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698