OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chromeos/events/event_rewriter.h" | 5 #include "chrome/browser/chromeos/events/event_rewriter.h" |
6 | 6 |
7 #include <X11/extensions/XInput2.h> | 7 #include <X11/extensions/XInput2.h> |
8 #include <X11/keysym.h> | 8 #include <X11/keysym.h> |
9 #include <X11/XF86keysym.h> | 9 #include <X11/XF86keysym.h> |
10 #include <X11/Xlib.h> | 10 #include <X11/Xlib.h> |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "chrome/browser/chromeos/login/user_manager.h" | 27 #include "chrome/browser/chromeos/login/user_manager.h" |
28 #include "chrome/browser/profiles/profile_manager.h" | 28 #include "chrome/browser/profiles/profile_manager.h" |
29 #include "chrome/common/pref_names.h" | 29 #include "chrome/common/pref_names.h" |
30 #include "chromeos/chromeos_switches.h" | 30 #include "chromeos/chromeos_switches.h" |
31 #include "chromeos/ime/input_method_manager.h" | 31 #include "chromeos/ime/input_method_manager.h" |
32 #include "chromeos/ime/xkeyboard.h" | 32 #include "chromeos/ime/xkeyboard.h" |
33 #include "ui/base/x/x11_util.h" | 33 #include "ui/base/x/x11_util.h" |
34 #include "ui/events/event.h" | 34 #include "ui/events/event.h" |
35 #include "ui/events/event_utils.h" | 35 #include "ui/events/event_utils.h" |
36 #include "ui/events/keycodes/keyboard_code_conversion_x.h" | 36 #include "ui/events/keycodes/keyboard_code_conversion_x.h" |
37 #include "ui/views/corewm/window_util.h" | 37 #include "ui/wm/core/window_util.h" |
38 | 38 |
39 namespace { | 39 namespace { |
40 | 40 |
41 const int kBadDeviceId = -1; | 41 const int kBadDeviceId = -1; |
42 | 42 |
43 const char kNeo2LayoutId[] = "xkb:de:neo:ger"; | 43 const char kNeo2LayoutId[] = "xkb:de:neo:ger"; |
44 const char kCaMultixLayoutId[] = "xkb:ca:multix:fra"; | 44 const char kCaMultixLayoutId[] = "xkb:ca:multix:fra"; |
45 | 45 |
46 // A key code and a flag we should use when a key is remapped to |remap_to|. | 46 // A key code and a flag we should use when a key is remapped to |remap_to|. |
47 const struct ModifierRemapping { | 47 const struct ModifierRemapping { |
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 VLOG(1) << "Apple keyboard '" << device_name << "' connected: " | 897 VLOG(1) << "Apple keyboard '" << device_name << "' connected: " |
898 << "id=" << device_id; | 898 << "id=" << device_id; |
899 } | 899 } |
900 // Always overwrite the existing device_id since the X server may reuse a | 900 // Always overwrite the existing device_id since the X server may reuse a |
901 // device id for an unattached device. | 901 // device id for an unattached device. |
902 device_id_to_type_[device_id] = type; | 902 device_id_to_type_[device_id] = type; |
903 return type; | 903 return type; |
904 } | 904 } |
905 | 905 |
906 } // namespace chromeos | 906 } // namespace chromeos |
OLD | NEW |