| 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 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_XKEYBOARD_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_XKEYBOARD_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_XKEYBOARD_H_ | 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_XKEYBOARD_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 // Creates a full XKB layout name like | 105 // Creates a full XKB layout name like |
| 106 // "gb(extd)+chromeos(leftcontrol_disabled_leftalt),us" | 106 // "gb(extd)+chromeos(leftcontrol_disabled_leftalt),us" |
| 107 // from modifier key mapping and |layout_name|, such as "us", "us(dvorak)", | 107 // from modifier key mapping and |layout_name|, such as "us", "us(dvorak)", |
| 108 // and "gb(extd)". Returns an empty string on error. Do not call this function | 108 // and "gb(extd)". Returns an empty string on error. Do not call this function |
| 109 // directly: it is public for testability. | 109 // directly: it is public for testability. |
| 110 virtual std::string CreateFullXkbLayoutName( | 110 virtual std::string CreateFullXkbLayoutName( |
| 111 const std::string& layout_name, | 111 const std::string& layout_name, |
| 112 const ModifierMap& modifire_map) = 0; | 112 const ModifierMap& modifire_map) = 0; |
| 113 | 113 |
| 114 // Returns a mask (e.g. 1U<<4) for Num Lock. On error, returns 0. | 114 // Returns a mask (e.g. 1U<<4) for Num Lock. On error, returns 0. Do not call |
| 115 // the function from non-UI threads. |
| 115 // TODO(yusukes): Move this and webdriver::GetXModifierMask() functions in | 116 // TODO(yusukes): Move this and webdriver::GetXModifierMask() functions in |
| 116 // chrome/test/webdriver/keycode_text_conversion_x.cc to ui/base/x/x11_util. | 117 // chrome/test/webdriver/keycode_text_conversion_x.cc to ui/base/x/x11_util. |
| 117 // The two functions are almost the same. | 118 // The two functions are almost the same. |
| 118 virtual unsigned int GetNumLockMask() = 0; | 119 virtual unsigned int GetNumLockMask() = 0; |
| 119 | 120 |
| 120 // Set true on |out_caps_lock_enabled| if Caps Lock is enabled. Set true on | 121 // Set true on |out_caps_lock_enabled| if Caps Lock is enabled. Set true on |
| 121 // |out_num_lock_enabled| if Num Lock is enabled. Both out parameters can be | 122 // |out_num_lock_enabled| if Num Lock is enabled. Both out parameters can be |
| 122 // NULL. Do not call the function from non-UI threads. | 123 // NULL. Do not call the function from non-UI threads. |
| 123 virtual void GetLockedModifiers(bool* out_caps_lock_enabled, | 124 virtual void GetLockedModifiers(bool* out_caps_lock_enabled, |
| 124 bool* out_num_lock_enabled) = 0; | 125 bool* out_num_lock_enabled) = 0; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 149 | 150 |
| 150 // Note: At this moment, classes other than InputMethodManager should not | 151 // Note: At this moment, classes other than InputMethodManager should not |
| 151 // instantiate the XKeyboard class. | 152 // instantiate the XKeyboard class. |
| 152 static XKeyboard* Create(const InputMethodUtil& util); | 153 static XKeyboard* Create(const InputMethodUtil& util); |
| 153 }; | 154 }; |
| 154 | 155 |
| 155 } // namespace input_method | 156 } // namespace input_method |
| 156 } // namespace chromeos | 157 } // namespace chromeos |
| 157 | 158 |
| 158 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_XKEYBOARD_H_ | 159 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_XKEYBOARD_H_ |
| OLD | NEW |