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

Side by Side Diff: tools/gn/gyp_target_writer.h

Issue 56433003: GN threading refactor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « tools/gn/gyp_binary_target_writer.cc ('k') | tools/gn/gyp_target_writer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef TOOLS_GN_GYP_TARGET_WRITER_H_ 5 #ifndef TOOLS_GN_GYP_TARGET_WRITER_H_
6 #define TOOLS_GN_GYP_TARGET_WRITER_H_ 6 #define TOOLS_GN_GYP_TARGET_WRITER_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "tools/gn/gyp_helper.h" 12 #include "tools/gn/gyp_helper.h"
13 13
14 class BuilderRecord;
14 class Err; 15 class Err;
15 class Settings; 16 class Settings;
16 class SourceFile; 17 class SourceFile;
17 class Target; 18 class Target;
18 19
19 class GypTargetWriter { 20 class GypTargetWriter {
20 public: 21 public:
21 struct TargetGroup { 22 struct TargetGroup {
22 TargetGroup() 23 TargetGroup()
23 : debug(NULL), 24 : debug(NULL),
24 release(NULL), 25 release(NULL),
25 host_debug(NULL), 26 host_debug(NULL),
26 host_release(NULL) { 27 host_release(NULL) {
27 } 28 }
28 const Target* debug; 29 const BuilderRecord* debug;
29 const Target* release; 30 const BuilderRecord* release;
30 const Target* host_debug; 31 const BuilderRecord* host_debug;
31 const Target* host_release; 32 const BuilderRecord* host_release;
32 }; 33 };
33 34
34 GypTargetWriter(const Target* target, std::ostream& out); 35 GypTargetWriter(const Target* target, std::ostream& out);
35 virtual ~GypTargetWriter(); 36 virtual ~GypTargetWriter();
36 37
37 static void WriteFile(const SourceFile& gyp_file, 38 static void WriteFile(const SourceFile& gyp_file,
38 const std::vector<TargetGroup>& targets, 39 const std::vector<TargetGroup>& targets,
39 Err* err); 40 Err* err);
40 41
41 virtual void Run() = 0; 42 virtual void Run() = 0;
42 43
43 protected: 44 protected:
44 const Settings* settings_; // Non-owning. 45 const Settings* settings_; // Non-owning.
45 const Target* target_; // Non-owning. 46 const Target* target_; // Non-owning.
46 std::ostream& out_; 47 std::ostream& out_;
47 48
48 GypHelper helper_; 49 GypHelper helper_;
49 50
50 private: 51 private:
51 DISALLOW_COPY_AND_ASSIGN(GypTargetWriter); 52 DISALLOW_COPY_AND_ASSIGN(GypTargetWriter);
52 }; 53 };
53 54
54 #endif // TOOLS_GN_GYP_TARGET_WRITER_H_ 55 #endif // TOOLS_GN_GYP_TARGET_WRITER_H_
OLDNEW
« no previous file with comments | « tools/gn/gyp_binary_target_writer.cc ('k') | tools/gn/gyp_target_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698