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

Unified Diff: mojo/tools/generate_java_callback_interfaces.py

Issue 705703002: Remove mojo/tools/, not needed in chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove gyp Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/tools/data/unittests ('k') | mojo/tools/message_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/tools/generate_java_callback_interfaces.py
diff --git a/mojo/tools/generate_java_callback_interfaces.py b/mojo/tools/generate_java_callback_interfaces.py
deleted file mode 100644
index 257a5403e07abcee50b2d0e8dbb82bb812e4d37d..0000000000000000000000000000000000000000
--- a/mojo/tools/generate_java_callback_interfaces.py
+++ /dev/null
@@ -1,69 +0,0 @@
-"""Generate the org.chromium.mojo.bindings.Callbacks interface"""
-
-import argparse
-import sys
-
-CALLBACK_TEMPLATE = ("""
- /**
- * A generic %d-argument callback.
- *
- * %s
- */
- interface Callback%d<%s> {
- /**
- * Call the callback.
- */
- public void call(%s);
- }
-""")
-
-INTERFACE_TEMPLATE = (
-"""// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file was generated using
-// mojo/tools/generate_java_callback_interfaces.py
-
-package org.chromium.mojo.bindings;
-
-/**
- * Contains a generic interface for callbacks.
- */
-public interface Callbacks {
-
- /**
- * A generic callback.
- */
- interface Callback0 {
- /**
- * Call the callback.
- */
- public void call();
- }
-%s
-}""")
-
-def GenerateCallback(nb_args):
- params = '\n * '.join(
- ['@param <T%d> the type of argument %d.' % (i+1, i+1)
- for i in xrange(nb_args)])
- template_parameters = ', '.join(['T%d' % (i+1) for i in xrange(nb_args)])
- callback_parameters = ', '.join(['T%d arg%d' % ((i+1), (i+1))
- for i in xrange(nb_args)])
- return CALLBACK_TEMPLATE % (nb_args, params, nb_args, template_parameters,
- callback_parameters)
-
-def main():
- parser = argparse.ArgumentParser(
- description="Generate org.chromium.mojo.bindings.Callbacks")
- parser.add_argument("max_args", nargs=1, type=int,
- help="maximal number of arguments to generate callbacks for")
- args = parser.parse_args()
- max_args = args.max_args[0]
- print INTERFACE_TEMPLATE % ''.join([GenerateCallback(i+1)
- for i in xrange(max_args)])
- return 0
-
-if __name__ == "__main__":
- sys.exit(main())
« no previous file with comments | « mojo/tools/data/unittests ('k') | mojo/tools/message_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698