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

Side by Side Diff: remoting/host/desktop_session_agent.cc

Issue 12320014: Switch Pepper Linux to use shared USB<->native key conversion table. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix missed kInvalidKeycode. Created 7 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
« no previous file with comments | « no previous file | remoting/host/event_executor_linux.cc » ('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/host/desktop_session_agent.h" 5 #include "remoting/host/desktop_session_agent.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "ipc/ipc_channel_proxy.h" 9 #include "ipc/ipc_channel_proxy.h"
10 #include "ipc/ipc_message.h" 10 #include "ipc/ipc_message.h"
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 DCHECK(caller_task_runner()->BelongsToCurrentThread()); 430 DCHECK(caller_task_runner()->BelongsToCurrentThread());
431 431
432 protocol::KeyEvent event; 432 protocol::KeyEvent event;
433 if (!event.ParseFromString(serialized_event)) { 433 if (!event.ParseFromString(serialized_event)) {
434 LOG(ERROR) << "Failed to parse protocol::KeyEvent."; 434 LOG(ERROR) << "Failed to parse protocol::KeyEvent.";
435 return; 435 return;
436 } 436 }
437 437
438 // Ignore unknown keycodes. 438 // Ignore unknown keycodes.
439 if (event.has_usb_keycode() && 439 if (event.has_usb_keycode() &&
440 UsbKeycodeToNativeKeycode(event.usb_keycode()) == kInvalidKeycode) { 440 (UsbKeycodeToNativeKeycode(event.usb_keycode()) ==
441 InvalidNativeKeycode())) {
441 LOG(ERROR) << "KeyEvent: unknown USB keycode: " 442 LOG(ERROR) << "KeyEvent: unknown USB keycode: "
442 << std::hex << event.usb_keycode() << std::dec; 443 << std::hex << event.usb_keycode() << std::dec;
443 return; 444 return;
444 } 445 }
445 446
446 remote_input_filter_->InjectKeyEvent(event); 447 remote_input_filter_->InjectKeyEvent(event);
447 } 448 }
448 449
449 void DesktopSessionAgent::OnInjectMouseEvent( 450 void DesktopSessionAgent::OnInjectMouseEvent(
450 const std::string& serialized_event) { 451 const std::string& serialized_event) {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 base::ClosePlatformFile(desktop_pipe_.fd); 553 base::ClosePlatformFile(desktop_pipe_.fd);
553 #else // !defined(OS_POSIX) 554 #else // !defined(OS_POSIX)
554 #error Unsupported platform. 555 #error Unsupported platform.
555 #endif // !defined(OS_POSIX) 556 #endif // !defined(OS_POSIX)
556 557
557 desktop_pipe_ = IPC::InvalidPlatformFileForTransit(); 558 desktop_pipe_ = IPC::InvalidPlatformFileForTransit();
558 } 559 }
559 } 560 }
560 561
561 } // namespace remoting 562 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/host/event_executor_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698