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

Unified Diff: ppapi/example/example.cc

Issue 7285010: Implement an input event resource. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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
Index: ppapi/example/example.cc
===================================================================
--- ppapi/example/example.cc (revision 90976)
+++ ppapi/example/example.cc (working copy)
@@ -17,12 +17,12 @@
#include "ppapi/c/dev/ppb_cursor_control_dev.h"
#include "ppapi/c/dev/ppp_printing_dev.h"
#include "ppapi/c/pp_errors.h"
-#include "ppapi/c/pp_input_event.h"
#include "ppapi/c/pp_rect.h"
#include "ppapi/cpp/completion_callback.h"
#include "ppapi/cpp/dev/scriptable_object_deprecated.h"
#include "ppapi/cpp/graphics_2d.h"
#include "ppapi/cpp/image_data.h"
+#include "ppapi/cpp/input_event.h"
#include "ppapi/cpp/private/instance_private.h"
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/private/var_private.h"
@@ -169,7 +169,9 @@
height_(0),
animation_counter_(0),
print_settings_valid_(false),
- showing_custom_cursor_(false) {}
+ showing_custom_cursor_(false) {
+ RequestInputEvents(PP_INPUTEVENT_CLASS_MOUSE);
+ }
virtual ~MyInstance() {
if (fetcher_) {
@@ -196,8 +198,8 @@
return true;
}
- virtual bool HandleInputEvent(const PP_InputEvent& event) {
- switch (event.type) {
+ virtual bool HandleInputEvent(const pp::InputEvent& event) {
+ switch (event.GetEventType()) {
case PP_INPUTEVENT_TYPE_MOUSEDOWN:
SayHello();
ToggleCursor();

Powered by Google App Engine
This is Rietveld 408576698