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

Unified Diff: tools/gn/visibility.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/visibility.h
diff --git a/tools/gn/visibility.h b/tools/gn/visibility.h
index d6d7f1ffe01a2796b0d1df8b99c1ccc617721047..4228f9dae77db223253568c4a2ba1265518a1d4f 100644
--- a/tools/gn/visibility.h
+++ b/tools/gn/visibility.h
@@ -5,12 +5,17 @@
#ifndef TOOLS_GN_VISIBILITY_H_
#define TOOLS_GN_VISIBILITY_H_
+#include <memory>
#include <vector>
#include "base/macros.h"
#include "tools/gn/label_pattern.h"
#include "tools/gn/source_dir.h"
+namespace base {
+class Value;
+}
+
class Err;
class Item;
class Label;
@@ -43,6 +48,9 @@ class Visibility {
// result will end in a newline.
std::string Describe(int indent, bool include_brackets) const;
+ // Returns value representation of this visibility
+ std::unique_ptr<base::Value> AsValue() const;
+
// Helper function to check visibility between the given two items. If
// to is invisible to from, returns false and sets the error.
static bool CheckItemVisibility(const Item* from, const Item* to, Err* err);

Powered by Google App Engine
This is Rietveld 408576698