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

Unified Diff: webkit/glue/plugins/pepper_plugin_instance.cc

Issue 3386019: Pull latest PPAPI. Change support for key handling. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/plugins/pepper_plugin_instance.h ('k') | webkit/glue/plugins/pepper_webplugin_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/pepper_plugin_instance.cc
===================================================================
--- webkit/glue/plugins/pepper_plugin_instance.cc (revision 60181)
+++ webkit/glue/plugins/pepper_plugin_instance.cc (working copy)
@@ -26,7 +26,7 @@
#include "third_party/ppapi/c/dev/ppb_fullscreen_dev.h"
#include "third_party/ppapi/c/dev/ppp_find_dev.h"
#include "third_party/ppapi/c/dev/ppp_zoom_dev.h"
-#include "third_party/ppapi/c/pp_event.h"
+#include "third_party/ppapi/c/pp_input_event.h"
#include "third_party/ppapi/c/pp_instance.h"
#include "third_party/ppapi/c/pp_rect.h"
#include "third_party/ppapi/c/pp_resource.h"
@@ -450,16 +450,23 @@
bool PluginInstance::HandleInputEvent(const WebKit::WebInputEvent& event,
WebCursorInfo* cursor_info) {
- scoped_ptr<PP_Event> pp_event(CreatePP_Event(event));
- if (!pp_event.get())
- return false;
+ std::vector<PP_InputEvent> pp_events;
+ CreatePPEvent(event, &pp_events);
- bool rv = instance_interface_->HandleEvent(GetPPInstance(), pp_event.get());
+ // Each input event may generate more than one PP_InputEvent.
+ bool rv = false;
+ for (size_t i = 0; i < pp_events.size(); i++)
+ rv |= instance_interface_->HandleInputEvent(GetPPInstance(), &pp_events[i]);
+
if (cursor_.get())
*cursor_info = *cursor_;
return rv;
}
+void PluginInstance::FocusChanged(bool has_focus) {
+ instance_interface_->FocusChanged(GetPPInstance(), has_focus);
+}
+
PP_Var PluginInstance::GetInstanceObject() {
return instance_interface_->GetInstanceObject(GetPPInstance());
}
« no previous file with comments | « webkit/glue/plugins/pepper_plugin_instance.h ('k') | webkit/glue/plugins/pepper_webplugin_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698