Make json5_generator.Writer always take a list of files.

The json5_generator.Writer constructor has a convenient interface where
you can specify either the name of a single file you want to read from,
or a list of files. However, this requires a branch in Writer that
checks if the argument is a string or a list, which is not Pythonic.

This patch makes Writer always take a list of files.

BUG=628043

Review-Url: https://codereview.chromium.org/2815773003
Cr-Commit-Position: refs/heads/master@{#466175}
diff --git a/third_party/WebKit/Source/build/scripts/json5_generator.py b/third_party/WebKit/Source/build/scripts/json5_generator.py
index f2e1f322..7b113eee 100644
--- a/third_party/WebKit/Source/build/scripts/json5_generator.py
+++ b/third_party/WebKit/Source/build/scripts/json5_generator.py
@@ -99,7 +99,7 @@
         self._process(doc)
 
     @classmethod
-    def load_from_files(cls, file_paths, default_metadata, default_parameters=None):
+    def load_from_files(cls, file_paths, default_metadata=None, default_parameters=None):
         merged_doc = dict()
         for path in file_paths:
             assert path.endswith(".json5")
@@ -198,8 +198,6 @@
     def __init__(self, json5_files):
         self._outputs = {}  # file_name -> generator
         self.gperf_path = None
-        if isinstance(json5_files, basestring):
-            json5_files = [json5_files]
         if json5_files:
             self.json5_file = Json5File.load_from_files(json5_files,
                                                         self.default_metadata,
diff --git a/third_party/WebKit/Source/build/scripts/make_css_property_apis.py b/third_party/WebKit/Source/build/scripts/make_css_property_apis.py
index 1fd786a..c092ae9 100755
--- a/third_party/WebKit/Source/build/scripts/make_css_property_apis.py
+++ b/third_party/WebKit/Source/build/scripts/make_css_property_apis.py
@@ -35,12 +35,12 @@
 
 class CSSPropertyAPIWriter(StyleBuilderWriter):
     def __init__(self, json5_file_paths):
-        super(CSSPropertyAPIWriter, self).__init__(json5_file_paths[0])
+        super(CSSPropertyAPIWriter, self).__init__([json5_file_paths[0]])
         # TODO(aazzam): Move the logic for loading CSSPropertyAPIMethods.json5 into a new class APIMethodsWriter().
         assert len(json5_file_paths) == 2,\
             'CSSPropertyAPIWriter requires 2 input json5 files files, got {}.'.format(len(json5_file_paths))
 
-        self.css_property_api_methods = Json5File.load_from_files([json5_file_paths[1]], {}, {})
+        self.css_property_api_methods = Json5File.load_from_files([json5_file_paths[1]])
 
         self._outputs = {
             'CSSPropertyDescriptor.cpp': self.generate_property_descriptor_cpp,