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

Unified Diff: third_party/mojo/src/mojo/public/tools/mojom_fetcher/pylib/fetcher/mojom_file.py

Issue 1348903003: third_party/mojo: Remove python/go/dart bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/mojo/src/mojo/public/tools/mojom_fetcher/pylib/fetcher/mojom_file.py
diff --git a/third_party/mojo/src/mojo/public/tools/mojom_fetcher/pylib/fetcher/mojom_file.py b/third_party/mojo/src/mojo/public/tools/mojom_fetcher/pylib/fetcher/mojom_file.py
deleted file mode 100644
index d8dbea4e684d92ce51ac3995c12b3785a17f968b..0000000000000000000000000000000000000000
--- a/third_party/mojo/src/mojo/public/tools/mojom_fetcher/pylib/fetcher/mojom_file.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 2015 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.
-
-import os
-
-from fetcher.dependency import Dependency, target_name_from_path
-
-
-class MojomFile(object):
- """Mojom represents an interface file at a given location in the
- repository."""
- def __init__(self, repository, name):
- self.name = name
- self._repository = repository
- self.deps = []
-
- def add_dependency(self, dependency):
- """Declare a new dependency of this mojom."""
- self.deps.append(Dependency(self._repository, self.name, dependency))
-
- def get_jinja_parameters(self, include_dirs):
- """Get the Jinja parameters to construct the BUILD.gn target of this
- mojom."""
- params = {}
- params["filename"] = os.path.basename(self.name)
- params["target_name"] = target_name_from_path(self.name)
- params["deps"] = []
- params["mojo_sdk_deps"] = []
- params["import_dirs"] = set()
-
- for dep in self.deps:
- # Mojo SDK dependencies have special treatment.
- if dep.is_sdk_dep():
- target, _ = dep.get_target_and_import(include_dirs)
- params["mojo_sdk_deps"].append(target)
- else:
- target, import_dir = dep.get_target_and_import(include_dirs)
- if import_dir != None:
- params["import_dirs"].add(import_dir)
- params["deps"].append(target)
-
- if len(params["import_dirs"]) != 0:
- params["import_dirs"] = list(params["import_dirs"])
- else:
- del params["import_dirs"]
- return params
-
- def _os_path_exists(self, path):
- return os.path.exists(path)
-

Powered by Google App Engine
This is Rietveld 408576698