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

Side by Side Diff: ppapi/shared_impl/instance_impl.cc

Issue 7285010: Implement an input event resource. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // 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
5 #include "ppapi/shared_impl/instance_impl.h"
6
7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/ppb_input_event.h"
9
10 namespace ppapi {
11
12 InstanceImpl::~InstanceImpl() {
13 }
14
15 int32_t InstanceImpl::ValidateRequestInputEvents(bool is_filtering,
16 uint32_t event_classes) {
17 // See if any bits are set we don't know about.
18 if (event_classes &
19 ~int32_t(PP_INPUTEVENT_CLASS_MOUSE | PP_INPUTEVENT_CLASS_KEYBOARD |
dmichael (off chromium) 2011/07/01 20:04:19 uint32_t, static_cast instead of C-style cast
brettw 2011/07/01 21:14:52 I changed it since it isn't normal for us to do th
20 PP_INPUTEVENT_CLASS_WHEEL | PP_INPUTEVENT_CLASS_TOUCH |
21 PP_INPUTEVENT_CLASS_IME))
22 return PP_ERROR_NOTSUPPORTED;
23
24 // See if the keyboard is requested in non-filtering mode.
25 if (!is_filtering && (event_classes & PP_INPUTEVENT_CLASS_KEYBOARD))
26 return PP_ERROR_NOTSUPPORTED;
27
28 // Everything else is valid.
29 return PP_OK;
30 }
31
32 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698