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

Side by Side Diff: native_client_sdk/src/examples/api/input_event/input_event.cc

Issue 182733012: NaCl SDK: Remove some unused variables in input_event.cc example (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // C headers 5 // C headers
6 #include <stdio.h> 6 #include <stdio.h>
7 7
8 // C++ headers 8 // C++ headers
9 #include <sstream> 9 #include <sstream>
10 #include <string> 10 #include <string>
11 11
12 // PPAPI headers 12 // PPAPI headers
13 #include "ppapi/cpp/completion_callback.h" 13 #include "ppapi/cpp/completion_callback.h"
14 #include "ppapi/cpp/input_event.h" 14 #include "ppapi/cpp/input_event.h"
15 #include "ppapi/cpp/instance.h" 15 #include "ppapi/cpp/instance.h"
16 #include "ppapi/cpp/module.h" 16 #include "ppapi/cpp/module.h"
17 #include "ppapi/cpp/point.h" 17 #include "ppapi/cpp/point.h"
18 #include "ppapi/cpp/var.h" 18 #include "ppapi/cpp/var.h"
19 #include "ppapi/utility/completion_callback_factory.h" 19 #include "ppapi/utility/completion_callback_factory.h"
20 20
21 #ifdef PostMessage 21 #ifdef PostMessage
22 #undef PostMessage 22 #undef PostMessage
23 #endif 23 #endif
24 24
25 namespace { 25 namespace {
26 26
27 const char* const kDidChangeFocus = "DidChangeFocus";
28 const char* const kHaveFocus = "HaveFocus";
29 const char* const kDontHaveFocus = "DontHaveFocus";
30
31 std::string ModifierToString(uint32_t modifier) { 27 std::string ModifierToString(uint32_t modifier) {
32 std::string s; 28 std::string s;
33 if (modifier & PP_INPUTEVENT_MODIFIER_SHIFTKEY) { 29 if (modifier & PP_INPUTEVENT_MODIFIER_SHIFTKEY) {
34 s += "shift "; 30 s += "shift ";
35 } 31 }
36 if (modifier & PP_INPUTEVENT_MODIFIER_CONTROLKEY) { 32 if (modifier & PP_INPUTEVENT_MODIFIER_CONTROLKEY) {
37 s += "ctrl "; 33 s += "ctrl ";
38 } 34 }
39 if (modifier & PP_INPUTEVENT_MODIFIER_ALTKEY) { 35 if (modifier & PP_INPUTEVENT_MODIFIER_ALTKEY) {
40 s += "alt "; 36 s += "alt ";
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 virtual ~InputEventModule() {} 245 virtual ~InputEventModule() {}
250 246
251 virtual pp::Instance* CreateInstance(PP_Instance instance) { 247 virtual pp::Instance* CreateInstance(PP_Instance instance) {
252 return new InputEventInstance(instance); 248 return new InputEventInstance(instance);
253 } 249 }
254 }; 250 };
255 251
256 namespace pp { 252 namespace pp {
257 Module* CreateModule() { return new InputEventModule(); } 253 Module* CreateModule() { return new InputEventModule(); }
258 } 254 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698