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

Unified Diff: src/trusted/plugin/ppapi/plugin_ppapi.cc

Issue 7395005: Proxy PPB_Input_Event, PPP_Input_Event, and associated IFs. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: copyright headers Created 9 years, 5 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 | « src/trusted/plugin/ppapi/plugin_ppapi.h ('k') | tests/ppapi_example_events/ppapi_example_events.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/plugin/ppapi/plugin_ppapi.cc
diff --git a/src/trusted/plugin/ppapi/plugin_ppapi.cc b/src/trusted/plugin/ppapi/plugin_ppapi.cc
index c6b4999779f7bfedbd6c533df5ef06ba293e44cd..aa492fdcee28e29eec89b09eb179abff0f540add 100644
--- a/src/trusted/plugin/ppapi/plugin_ppapi.cc
+++ b/src/trusted/plugin/ppapi/plugin_ppapi.cc
@@ -25,6 +25,8 @@
#include "native_client/src/shared/platform/nacl_check.h"
#include "native_client/src/shared/platform/nacl_time.h"
#include "native_client/src/shared/ppapi_proxy/browser_ppp.h"
+#include "native_client/src/third_party/ppapi/c/ppp_input_event.h"
+#include "native_client/src/third_party/ppapi/cpp/input_event.h"
#include "native_client/src/trusted/desc/nacl_desc_wrapper.h"
#include "native_client/src/trusted/handle_pass/browser_handle.h"
#include "native_client/src/trusted/plugin/desc_based_handle.h"
@@ -698,7 +700,6 @@ void PluginPpapi::DidChangeFocus(bool has_focus) {
}
}
-
bool PluginPpapi::HandleInputEvent(const PP_InputEvent& event) {
PLUGIN_PRINTF(("PluginPpapi::HandleInputEvent (this=%p)\n",
static_cast<void*>(this)));
@@ -706,13 +707,27 @@ bool PluginPpapi::HandleInputEvent(const PP_InputEvent& event) {
return false; // event is not handled here.
} else {
bool handled = pp::PPBoolToBool(
- ppapi_proxy_->ppp_instance_interface()->HandleInputEvent(
- pp_instance(), &event));
- PLUGIN_PRINTF(("PluginPpapi::HandleInputEvent (handled=%d)\n", handled));
+ ppapi_proxy_->ppp_instance_interface()->HandleInputEvent(
+ pp_instance(), &event));
+ PLUGIN_PRINTF(("PluginPpapi::HandleInputEvent (old) (handled=%d)\n",
+ handled));
return handled;
}
}
+bool PluginPpapi::HandleInputEvent(const pp::InputEvent& event) {
+ PLUGIN_PRINTF(("PluginPpapi::HandleInputEvent (this=%p)\n",
+ static_cast<void*>(this)));
+ if ((ppapi_proxy_ == NULL) || !(ppapi_proxy_->ppp_input_event_interface())) {
+ return false; // event is not handled here.
+ } else {
+ bool handled = pp::PPBoolToBool(
+ ppapi_proxy_->ppp_input_event_interface()->HandleInputEvent(
+ pp_instance(), event.pp_resource()));
+ PLUGIN_PRINTF(("PluginPpapi::HandleInputEvent (handled=%d)\n", handled));
+ return handled;
+ }
+}
bool PluginPpapi::HandleDocumentLoad(const pp::URLLoader& url_loader) {
PLUGIN_PRINTF(("PluginPpapi::HandleDocumentLoad (this=%p)\n",
« no previous file with comments | « src/trusted/plugin/ppapi/plugin_ppapi.h ('k') | tests/ppapi_example_events/ppapi_example_events.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698