Removing uses of X11 native key events.
[chromium-blink-merge.git] / tools / gn / ninja_writer.h
blob8859f1ad65ec4e7e2c434d097108f87f5283e587
1 // Copyright (c) 2013 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.
5 #ifndef TOOLS_GN_NINJA_WRITER_H_
6 #define TOOLS_GN_NINJA_WRITER_H_
8 #include <set>
9 #include <string>
10 #include <vector>
12 #include "base/basictypes.h"
14 class Builder;
15 class BuildSettings;
16 class Settings;
17 class Target;
19 class NinjaWriter {
20 public:
21 // On failure will print an error and will return false.
22 static bool RunAndWriteFiles(const BuildSettings* build_settings,
23 Builder* builder);
25 // Writes only the toolchain.ninja files, skipping the root buildfile. The
26 // settings for the files written will be added to the vector.
27 static bool RunAndWriteToolchainFiles(
28 const BuildSettings* build_settings,
29 Builder* builder,
30 std::vector<const Settings*>* all_settings);
32 private:
33 NinjaWriter(const BuildSettings* build_settings, Builder* builder);
34 ~NinjaWriter();
36 bool WriteToolchains(
37 std::vector<const Settings*>* all_settings,
38 std::vector<const Target*>* default_targets);
39 bool WriteRootBuildfiles(const std::vector<const Settings*>& all_settings,
40 const std::vector<const Target*>& default_targets);
42 const BuildSettings* build_settings_;
43 Builder* builder_;
45 DISALLOW_COPY_AND_ASSIGN(NinjaWriter);
48 #endif // TOOLS_GN_NINJA_WRITER_H_