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

Side by Side Diff: mojo/public/tools/mojom_fetcher/pylib/fetcher/mojom_directory.py

Issue 1709333002: Remove mojom_fetcher. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
(Empty)
1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import os
6
7 from fetcher.dependency import group_target_name
8
9 class MojomDirectory(object):
10 """This class represents a directory that directly holds mojom files, in the
11 external directory structure."""
12 def __init__(self, path):
13 self.path = path
14 self.mojoms = []
15
16 def add_mojom(self, mojom):
17 self.mojoms.append(mojom)
18
19 def get_jinja_parameters(self, include_dirs):
20 """Get the Jinja parameters to construct the BUILD.gn file of this
21 directory."""
22 params = {}
23 params["group_name"] = group_target_name(self.path)
24 params["mojoms"] = []
25 for mojom in self.mojoms:
26 params["mojoms"].append(mojom.get_jinja_parameters(include_dirs))
27 return params
28
29 def get_build_gn_path(self):
30 return os.path.join(self.path, "BUILD.gn")
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698