| OLD | NEW |
| 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 "chrome/browser/ui/ash/event_rewriter.h" | 5 #include "chrome/browser/ui/ash/event_rewriter.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include <X11/keysym.h> | 21 #include <X11/keysym.h> |
| 22 #include <X11/XF86keysym.h> | 22 #include <X11/XF86keysym.h> |
| 23 #include <X11/Xlib.h> | 23 #include <X11/Xlib.h> |
| 24 | 24 |
| 25 // Get rid of a macro from Xlib.h that conflicts with OwnershipService class. | 25 // Get rid of a macro from Xlib.h that conflicts with OwnershipService class. |
| 26 #undef Status | 26 #undef Status |
| 27 | 27 |
| 28 #include "base/chromeos/chromeos_version.h" | 28 #include "base/chromeos/chromeos_version.h" |
| 29 #include "base/command_line.h" | 29 #include "base/command_line.h" |
| 30 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" | 30 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" |
| 31 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | |
| 32 #include "chrome/browser/chromeos/login/login_display_host_impl.h" | 31 #include "chrome/browser/chromeos/login/login_display_host_impl.h" |
| 33 #include "chrome/browser/chromeos/login/user_manager.h" | 32 #include "chrome/browser/chromeos/login/user_manager.h" |
| 34 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" | 33 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" |
| 35 #include "chrome/common/chrome_switches.h" | 34 #include "chrome/common/chrome_switches.h" |
| 36 #include "chrome/common/pref_names.h" | 35 #include "chrome/common/pref_names.h" |
| 36 #include "chromeos/ime/input_method_manager.h" |
| 37 #include "chromeos/ime/xkeyboard.h" | 37 #include "chromeos/ime/xkeyboard.h" |
| 38 #include "ui/base/keycodes/keyboard_code_conversion_x.h" | 38 #include "ui/base/keycodes/keyboard_code_conversion_x.h" |
| 39 #include "ui/base/x/x11_util.h" | 39 #include "ui/base/x/x11_util.h" |
| 40 | 40 |
| 41 using chromeos::input_method::GetInputMethodManager; | 41 using chromeos::input_method::GetInputMethodManager; |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 namespace { | 44 namespace { |
| 45 | 45 |
| 46 const int kBadDeviceId = -1; | 46 const int kBadDeviceId = -1; |
| (...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 const DeviceType type = EventRewriter::GetDeviceType(device_name); | 1014 const DeviceType type = EventRewriter::GetDeviceType(device_name); |
| 1015 if (type == kDeviceAppleKeyboard) { | 1015 if (type == kDeviceAppleKeyboard) { |
| 1016 VLOG(1) << "Apple keyboard '" << device_name << "' connected: " | 1016 VLOG(1) << "Apple keyboard '" << device_name << "' connected: " |
| 1017 << "id=" << device_id; | 1017 << "id=" << device_id; |
| 1018 } | 1018 } |
| 1019 // Always overwrite the existing device_id since the X server may reuse a | 1019 // Always overwrite the existing device_id since the X server may reuse a |
| 1020 // device id for an unattached device. | 1020 // device id for an unattached device. |
| 1021 device_id_to_type_[device_id] = type; | 1021 device_id_to_type_[device_id] = type; |
| 1022 return type; | 1022 return type; |
| 1023 } | 1023 } |
| OLD | NEW |