blob: a2416cefaa9e2a47bf52b51b08eba85115ef8538 [file] [log] [blame]
[email protected]493d14212011-07-07 15:38:481// Copyright (c) 2011 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]9a578392011-12-07 18:59:275#include "ppapi/shared_impl/ppb_instance_shared.h"
[email protected]493d14212011-07-07 15:38:486
7#include "ppapi/c/pp_errors.h"
8#include "ppapi/c/ppb_input_event.h"
9
10namespace ppapi {
11
[email protected]9a578392011-12-07 18:59:2712PPB_Instance_Shared::~PPB_Instance_Shared() {
[email protected]493d14212011-07-07 15:38:4813}
14
[email protected]9a578392011-12-07 18:59:2715int32_t PPB_Instance_Shared::ValidateRequestInputEvents(
16 bool is_filtering,
17 uint32_t event_classes) {
[email protected]493d14212011-07-07 15:38:4818 // See if any bits are set we don't know about.
19 if (event_classes &
20 ~static_cast<uint32_t>(PP_INPUTEVENT_CLASS_MOUSE |
21 PP_INPUTEVENT_CLASS_KEYBOARD |
22 PP_INPUTEVENT_CLASS_WHEEL |
23 PP_INPUTEVENT_CLASS_TOUCH |
24 PP_INPUTEVENT_CLASS_IME))
25 return PP_ERROR_NOTSUPPORTED;
26
[email protected]493d14212011-07-07 15:38:4827 // Everything else is valid.
28 return PP_OK;
29}
30
31} // namespace ppapi