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

Side by Side Diff: chrome/browser/chromeos/input_method/xkeyboard.h

Issue 10456055: Stop using "+chromeos(...)" in an XKB layout name. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
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 #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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 virtual void SetCapsLockEnabled(bool enable_caps_lock) = 0; 78 virtual void SetCapsLockEnabled(bool enable_caps_lock) = 0;
79 79
80 // Returns true if num lock is enabled. Do not call the function from non-UI 80 // Returns true if num lock is enabled. Do not call the function from non-UI
81 // threads. 81 // threads.
82 virtual bool NumLockIsEnabled() = 0; 82 virtual bool NumLockIsEnabled() = 0;
83 83
84 // Returns true if caps lock is enabled. Do not call the function from non-UI 84 // Returns true if caps lock is enabled. Do not call the function from non-UI
85 // threads. 85 // threads.
86 virtual bool CapsLockIsEnabled() = 0; 86 virtual bool CapsLockIsEnabled() = 0;
87 87
88 // Creates a full XKB layout name like
89 // "gb(extd)+chromeos(leftcontrol_disabled_leftalt),us"
90 // from modifier key mapping and |layout_name|, such as "us", "us(dvorak)",
91 // and "gb(extd)". Returns an empty string on error. Do not call this function
92 // directly: it is public for testability.
93 // TODO(yusukes): Remove this method from the interface class.
94 virtual std::string CreateFullXkbLayoutName(
95 const std::string& layout_name) = 0;
96
97 // Returns a mask (e.g. 1U<<4) for Num Lock. On error, returns 0. Do not call 88 // Returns a mask (e.g. 1U<<4) for Num Lock. On error, returns 0. Do not call
98 // the function from non-UI threads. 89 // the function from non-UI threads.
99 // TODO(yusukes): Move this and webdriver::GetXModifierMask() functions in 90 // TODO(yusukes): Move this and webdriver::GetXModifierMask() functions in
100 // chrome/test/webdriver/keycode_text_conversion_x.cc to ui/base/x/x11_util. 91 // chrome/test/webdriver/keycode_text_conversion_x.cc to ui/base/x/x11_util.
101 // The two functions are almost the same. 92 // The two functions are almost the same.
102 virtual unsigned int GetNumLockMask() = 0; 93 virtual unsigned int GetNumLockMask() = 0;
103 94
104 // Set true on |out_caps_lock_enabled| if Caps Lock is enabled. Set true on 95 // Set true on |out_caps_lock_enabled| if Caps Lock is enabled. Set true on
105 // |out_num_lock_enabled| if Num Lock is enabled. Both out parameters can be 96 // |out_num_lock_enabled| if Num Lock is enabled. Both out parameters can be
106 // NULL. Do not call the function from non-UI threads. 97 // NULL. Do not call the function from non-UI threads.
(...skipping 12 matching lines...) Expand all
119 static bool SetAutoRepeatRate(const AutoRepeatRate& rate); 110 static bool SetAutoRepeatRate(const AutoRepeatRate& rate);
120 111
121 // Returns true if auto repeat is enabled. This function is protected: for 112 // Returns true if auto repeat is enabled. This function is protected: for
122 // testability. 113 // testability.
123 static bool GetAutoRepeatEnabledForTesting(); 114 static bool GetAutoRepeatEnabledForTesting();
124 115
125 // On success, set current auto repeat rate on |out_rate| and returns true. 116 // On success, set current auto repeat rate on |out_rate| and returns true.
126 // Returns false otherwise. This function is protected: for testability. 117 // Returns false otherwise. This function is protected: for testability.
127 static bool GetAutoRepeatRateForTesting(AutoRepeatRate* out_rate); 118 static bool GetAutoRepeatRateForTesting(AutoRepeatRate* out_rate);
128 119
120 // Returns false if |layout_name| contains a bad character.
121 static bool CheckLayoutNameForTesting(const std::string& layout_name);
122
129 // Note: At this moment, classes other than InputMethodManager should not 123 // Note: At this moment, classes other than InputMethodManager should not
130 // instantiate the XKeyboard class. 124 // instantiate the XKeyboard class.
131 static XKeyboard* Create(const InputMethodUtil& util); 125 static XKeyboard* Create(const InputMethodUtil& util);
132 }; 126 };
133 127
134 } // namespace input_method 128 } // namespace input_method
135 } // namespace chromeos 129 } // namespace chromeos
136 130
137 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_XKEYBOARD_H_ 131 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_XKEYBOARD_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/input_method/mock_xkeyboard.cc ('k') | chrome/browser/chromeos/input_method/xkeyboard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698