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

Side by Side Diff: remoting/client/plugin/pepper_input_handler.cc

Issue 9353013: Add GetUsbKeyCode dev interface for Pepper key events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-sync to remove unrelated edits Created 8 years, 10 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
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 #include "remoting/client/plugin/pepper_input_handler.h" 5 #include "remoting/client/plugin/pepper_input_handler.h"
6 6
7 #include <iomanip> 7 #include <iomanip>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ppapi/cpp/input_event.h" 10 #include "ppapi/cpp/input_event.h"
(...skipping 17 matching lines...) Expand all
28 // We need to return true here or else we'll get a local (plugin) context 28 // We need to return true here or else we'll get a local (plugin) context
29 // menu instead of the mouseup event for the right click. 29 // menu instead of the mouseup event for the right click.
30 return true; 30 return true;
31 } 31 }
32 32
33 case PP_INPUTEVENT_TYPE_KEYDOWN: 33 case PP_INPUTEVENT_TYPE_KEYDOWN:
34 case PP_INPUTEVENT_TYPE_KEYUP: { 34 case PP_INPUTEVENT_TYPE_KEYUP: {
35 pp::KeyboardInputEvent pp_key_event(event); 35 pp::KeyboardInputEvent pp_key_event(event);
36 protocol::KeyEvent key_event; 36 protocol::KeyEvent key_event;
37 37
38 // TODO(garykac): Switch to use |pp_key_event.GetUsbScanCode()|.
Wez 2012/02/17 01:31:01 I don't think this comment belongs in this CL?
garykac 2012/02/17 18:25:30 Done.
38 key_event.set_keycode(pp_key_event.GetKeyCode()); 39 key_event.set_keycode(pp_key_event.GetKeyCode());
39 key_event.set_pressed(event.GetType() == PP_INPUTEVENT_TYPE_KEYDOWN); 40 key_event.set_pressed(event.GetType() == PP_INPUTEVENT_TYPE_KEYDOWN);
40 41
41 // Dump the modifiers associated with each ESC key release event 42 // Dump the modifiers associated with each ESC key release event
42 // to facilitate debugging of issues caused by mixed up modifiers. 43 // to facilitate debugging of issues caused by mixed up modifiers.
43 if ((pp_key_event.GetKeyCode() == ui::VKEY_ESCAPE) && 44 if ((pp_key_event.GetKeyCode() == ui::VKEY_ESCAPE) &&
44 (event.GetType() == PP_INPUTEVENT_TYPE_KEYUP)) { 45 (event.GetType() == PP_INPUTEVENT_TYPE_KEYUP)) {
45 LOG(INFO) << "ESC released: modifiers=0x" 46 LOG(INFO) << "ESC released: modifiers=0x"
46 << std::hex << pp_key_event.GetModifiers() << std::dec; 47 << std::hex << pp_key_event.GetModifiers() << std::dec;
47 } 48 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 default: { 116 default: {
116 LOG(INFO) << "Unhandled input event: " << event.GetType(); 117 LOG(INFO) << "Unhandled input event: " << event.GetType();
117 break; 118 break;
118 } 119 }
119 } 120 }
120 121
121 return false; 122 return false;
122 } 123 }
123 124
124 } // namespace remoting 125 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698