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

Unified Diff: tools/gn/desc_builder.h

Issue 2064533002: [GN] Add JSON project writer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase, fix build, fix variable names Created 4 years, 5 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: tools/gn/desc_builder.h
diff --git a/tools/gn/desc_builder.h b/tools/gn/desc_builder.h
new file mode 100644
index 0000000000000000000000000000000000000000..bd2aac3cc0fe8fe2a99a9f512b2af8f85399a5fe
--- /dev/null
+++ b/tools/gn/desc_builder.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2016 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.
+
+#ifndef TOOLS_GN_DESC_BUILDER_H_
+#define TOOLS_GN_DESC_BUILDER_H_
+
+#include "base/values.h"
+#include "tools/gn/target.h"
+
+class DescBuilder {
+ public:
+ // Creates Dictionary representation for given target
+ static std::unique_ptr<base::DictionaryValue> DescriptionForTarget(
+ const Target* target,
+ const std::string& what,
+ bool all,
+ bool tree,
+ bool blame);
+
+ // Creates Dictionary representation for given config
+ static std::unique_ptr<base::DictionaryValue> DescriptionForConfig(
+ const Config* config,
+ const std::string& what);
+
+ // Unlike Target::GetStringForOutputType, result of
+ // DescBuilder::GetStringForOutputType matches Target::OutputType enum values
+ static const char* GetStringForOutputType(Target::OutputType type);
+ static Target::OutputType GetOutputTypeForString(const std::string& type);
+};
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698