| Index: ppapi/examples/file_chooser/file_chooser.cc
|
| diff --git a/ppapi/examples/file_chooser/file_chooser.cc b/ppapi/examples/file_chooser/file_chooser.cc
|
| index 598095fdf5361610d31c1f0448f9ced43822d660..612e8e49b47b47cc3d8b75b9a0ada9e75555bf55 100644
|
| --- a/ppapi/examples/file_chooser/file_chooser.cc
|
| +++ b/ppapi/examples/file_chooser/file_chooser.cc
|
| @@ -7,6 +7,7 @@
|
| #include "ppapi/cpp/completion_callback.h"
|
| #include "ppapi/cpp/dev/file_chooser_dev.h"
|
| #include "ppapi/cpp/file_ref.h"
|
| +#include "ppapi/cpp/input_event.h"
|
| #include "ppapi/cpp/module.h"
|
| #include "ppapi/cpp/private/instance_private.h"
|
| #include "ppapi/cpp/private/var_private.h"
|
| @@ -18,13 +19,14 @@ class MyInstance : public pp::InstancePrivate {
|
| callback_factory_.Initialize(this);
|
| }
|
|
|
| - virtual bool HandleInputEvent(const PP_InputEvent& event) {
|
| - switch (event.type) {
|
| + virtual bool HandleInputEvent(const pp::InputEvent& event) {
|
| + switch (event.GetType()) {
|
| case PP_INPUTEVENT_TYPE_MOUSEDOWN: {
|
| - const PP_InputEvent_Mouse& mouse_event = event.u.mouse;
|
| - if (mouse_event.button == PP_INPUTEVENT_MOUSEBUTTON_LEFT)
|
| + pp::MouseInputEvent mouse_event(event);
|
| + if (mouse_event.GetMouseButton() == PP_INPUTEVENT_MOUSEBUTTON_LEFT)
|
| ShowFileChooser(false);
|
| - else if (mouse_event.button == PP_INPUTEVENT_MOUSEBUTTON_RIGHT)
|
| + else if (mouse_event.GetMouseButton()
|
| + == PP_INPUTEVENT_MOUSEBUTTON_RIGHT)
|
| ShowFileChooser(true);
|
| else
|
| return false;
|
|
|