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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/sticky_keys/sticky_keys_controller.h" | 9 #include "ash/sticky_keys/sticky_keys_controller.h" |
10 #include "ash/wm/window_state.h" | 10 #include "ash/wm/window_state.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 return NULL; // The |pref_name| hasn't been registered. On login screen? | 96 return NULL; // The |pref_name| hasn't been registered. On login screen? |
97 const int value = pref_service.GetInteger(pref_name.c_str()); | 97 const int value = pref_service.GetInteger(pref_name.c_str()); |
98 for (size_t i = 0; i < arraysize(kModifierRemappings); ++i) { | 98 for (size_t i = 0; i < arraysize(kModifierRemappings); ++i) { |
99 if (value == kModifierRemappings[i].remap_to) | 99 if (value == kModifierRemappings[i].remap_to) |
100 return &kModifierRemappings[i]; | 100 return &kModifierRemappings[i]; |
101 } | 101 } |
102 return NULL; | 102 return NULL; |
103 } | 103 } |
104 | 104 |
105 bool HasDiamondKey() { | 105 bool HasDiamondKey() { |
106 return CommandLine::ForCurrentProcess()->HasSwitch( | 106 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
107 chromeos::switches::kHasChromeOSDiamondKey); | 107 chromeos::switches::kHasChromeOSDiamondKey); |
108 } | 108 } |
109 | 109 |
110 bool IsISOLevel5ShiftUsedByCurrentInputMethod() { | 110 bool IsISOLevel5ShiftUsedByCurrentInputMethod() { |
111 // Since both German Neo2 XKB layout and Caps Lock depend on Mod3Mask, | 111 // Since both German Neo2 XKB layout and Caps Lock depend on Mod3Mask, |
112 // it's not possible to make both features work. For now, we don't remap | 112 // it's not possible to make both features work. For now, we don't remap |
113 // Mod3Mask when Neo2 is in use. | 113 // Mod3Mask when Neo2 is in use. |
114 // TODO(yusukes): Remove the restriction. | 114 // TODO(yusukes): Remove the restriction. |
115 input_method::InputMethodManager* manager = | 115 input_method::InputMethodManager* manager = |
116 input_method::InputMethodManager::Get(); | 116 input_method::InputMethodManager::Get(); |
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
996 // TODO(spang): Figure out where we can get keyboard vendor/product id from in | 996 // TODO(spang): Figure out where we can get keyboard vendor/product id from in |
997 // Ozone/Freon version. | 997 // Ozone/Freon version. |
998 return KeyboardDeviceAddedInternal(device_id, | 998 return KeyboardDeviceAddedInternal(device_id, |
999 "keyboard", | 999 "keyboard", |
1000 kUnknownVendorId, | 1000 kUnknownVendorId, |
1001 kUnknownProductId); | 1001 kUnknownProductId); |
1002 #endif | 1002 #endif |
1003 } | 1003 } |
1004 | 1004 |
1005 } // namespace chromeos | 1005 } // namespace chromeos |
OLD | NEW |