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

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

Issue 727143002: Moves code from chromeos/ime to ui/base/ime/chromeos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit. 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.
12 14
13 Run it like: 15 Run it like:
14 gen_input_methods.py input_methods.txt input_methods.h 16 gen_input_methods.py input_methods.txt input_methods.h
15 17
16 It will produce output that looks like: 18 It will produce output that looks like:
17 19
18 // This file is automatically generated by gen_input_methods.py 20 // This file is automatically generated by gen_input_methods.py
19 #ifndef CHROMEOS_IME_INPUT_METHODS_H_ 21 #ifndef CHROMEOS_IME_INPUT_METHODS_H_
20 #define CHROMEOS_IME_INPUT_METHODS_H_ 22 #define CHROMEOS_IME_INPUT_METHODS_H_
21 23
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 engine['is_login_keyboard'] = is_login_keyboard 125 engine['is_login_keyboard'] = is_login_keyboard
124 engines.append(engine) 126 engines.append(engine)
125 127
126 output = CreateEngineHeader(engines) 128 output = CreateEngineHeader(engines)
127 output_file = open(sys.argv[2], 'w') 129 output_file = open(sys.argv[2], 'w')
128 output_file.write(output) 130 output_file.write(output)
129 131
130 132
131 if __name__ == '__main__': 133 if __name__ == '__main__':
132 main(sys.argv) 134 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