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

Side by Side Diff: chromeos/ime/gen_input_methods.py

Issue 750353004: Revert of Moves code from chromeos/ime to ui/base/ime/chromeos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « chromeos/ime/fake_input_method_delegate.cc ('k') | chromeos/ime/ime_keyboard.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Generate a C++ header from input_methods.txt. 6 """Generate a C++ header from input_methods.txt.
7 7
8 This program generates a C++ header file containing the information on 8 This program generates a C++ header file containing the information on
9 available input methods. It parses input_methods.txt, and then generates a 9 available input methods. It parses input_methods.txt, and then generates a
10 static array definition from the information extracted. The input and output 10 static array definition from the information extracted. The input and output
11 file names are specified on the command line. 11 file names are specified on the command line.
12 The header input_methods.h is used in input_method_whitelist.cc which is for
13 testing purpose.
14 12
15 Run it like: 13 Run it like:
16 gen_input_methods.py input_methods.txt input_methods.h 14 gen_input_methods.py input_methods.txt input_methods.h
17 15
18 It will produce output that looks like: 16 It will produce output that looks like:
19 17
20 // This file is automatically generated by gen_input_methods.py 18 // This file is automatically generated by gen_input_methods.py
21 #ifndef CHROMEOS_IME_INPUT_METHODS_H_ 19 #ifndef CHROMEOS_IME_INPUT_METHODS_H_
22 #define CHROMEOS_IME_INPUT_METHODS_H_ 20 #define CHROMEOS_IME_INPUT_METHODS_H_
23 21
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 engine['is_login_keyboard'] = is_login_keyboard 123 engine['is_login_keyboard'] = is_login_keyboard
126 engines.append(engine) 124 engines.append(engine)
127 125
128 output = CreateEngineHeader(engines) 126 output = CreateEngineHeader(engines)
129 output_file = open(sys.argv[2], 'w') 127 output_file = open(sys.argv[2], 'w')
130 output_file.write(output) 128 output_file.write(output)
131 129
132 130
133 if __name__ == '__main__': 131 if __name__ == '__main__':
134 main(sys.argv) 132 main(sys.argv)
OLDNEW
« no previous file with comments | « chromeos/ime/fake_input_method_delegate.cc ('k') | chromeos/ime/ime_keyboard.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698