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

Side by Side Diff: remoting/protocol/host_event_dispatcher.cc

Issue 10894050: Remove support for Windows-style keycodes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Linux EventExecutor typo. Created 8 years, 3 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 | « remoting/protocol/client_event_dispatcher.cc ('k') | remoting/protocol/input_event_tracker.h » ('j') | 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 #include "remoting/protocol/host_event_dispatcher.h" 5 #include "remoting/protocol/host_event_dispatcher.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "net/socket/stream_socket.h" 8 #include "net/socket/stream_socket.h"
9 #include "remoting/base/constants.h" 9 #include "remoting/base/constants.h"
10 #include "remoting/proto/event.pb.h" 10 #include "remoting/proto/event.pb.h"
(...skipping 20 matching lines...) Expand all
31 scoped_ptr<EventMessage> message, const base::Closure& done_task) { 31 scoped_ptr<EventMessage> message, const base::Closure& done_task) {
32 DCHECK(input_stub_); 32 DCHECK(input_stub_);
33 33
34 base::ScopedClosureRunner done_runner(done_task); 34 base::ScopedClosureRunner done_runner(done_task);
35 35
36 if (message->has_sequence_number() && !sequence_number_callback_.is_null()) 36 if (message->has_sequence_number() && !sequence_number_callback_.is_null())
37 sequence_number_callback_.Run(message->sequence_number()); 37 sequence_number_callback_.Run(message->sequence_number());
38 38
39 if (message->has_key_event()) { 39 if (message->has_key_event()) {
40 const KeyEvent& event = message->key_event(); 40 const KeyEvent& event = message->key_event();
41 if ((event.has_keycode() || event.has_usb_keycode()) && 41 if (event.has_usb_keycode() && event.has_pressed()) {
42 event.has_pressed()) {
43 input_stub_->InjectKeyEvent(event); 42 input_stub_->InjectKeyEvent(event);
44 } else { 43 } else {
45 LOG(WARNING) << "Received invalid key event."; 44 LOG(WARNING) << "Received invalid key event.";
46 } 45 }
47 } else if (message->has_mouse_event()) { 46 } else if (message->has_mouse_event()) {
48 input_stub_->InjectMouseEvent(message->mouse_event()); 47 input_stub_->InjectMouseEvent(message->mouse_event());
49 } else { 48 } else {
50 LOG(WARNING) << "Unknown event message received."; 49 LOG(WARNING) << "Unknown event message received.";
51 } 50 }
52 } 51 }
53 52
54 } // namespace protocol 53 } // namespace protocol
55 } // namespace remoting 54 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/client_event_dispatcher.cc ('k') | remoting/protocol/input_event_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698