OLD | NEW |
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_LOADER_H_ | 5 #ifndef TOOLS_GN_LOADER_H_ |
6 #define TOOLS_GN_LOADER_H_ | 6 #define TOOLS_GN_LOADER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 class LoaderImpl : public Loader { | 73 class LoaderImpl : public Loader { |
74 public: | 74 public: |
75 // Callback to emulate InputFileManager::AsyncLoadFile. | 75 // Callback to emulate InputFileManager::AsyncLoadFile. |
76 typedef base::Callback<bool(const LocationRange&, | 76 typedef base::Callback<bool(const LocationRange&, |
77 const BuildSettings*, | 77 const BuildSettings*, |
78 const SourceFile&, | 78 const SourceFile&, |
79 const base::Callback<void(const ParseNode*)>&, | 79 const base::Callback<void(const ParseNode*)>&, |
80 Err*)> AsyncLoadFileCallback; | 80 Err*)> AsyncLoadFileCallback; |
81 | 81 |
82 LoaderImpl(const BuildSettings* build_settings); | 82 explicit LoaderImpl(const BuildSettings* build_settings); |
83 | 83 |
84 // Loader implementation. | 84 // Loader implementation. |
85 void Load(const SourceFile& file, | 85 void Load(const SourceFile& file, |
86 const LocationRange& origin, | 86 const LocationRange& origin, |
87 const Label& toolchain_name) override; | 87 const Label& toolchain_name) override; |
88 void ToolchainLoaded(const Toolchain* toolchain) override; | 88 void ToolchainLoaded(const Toolchain* toolchain) override; |
89 Label GetDefaultToolchain() const override; | 89 Label GetDefaultToolchain() const override; |
90 const Settings* GetToolchainSettings(const Label& label) const override; | 90 const Settings* GetToolchainSettings(const Label& label) const override; |
91 | 91 |
92 // Sets the message loop corresponding to the main thread. By default this | 92 // Sets the message loop corresponding to the main thread. By default this |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 const BuildSettings* build_settings_; | 172 const BuildSettings* build_settings_; |
173 Label default_toolchain_label_; | 173 Label default_toolchain_label_; |
174 | 174 |
175 // Records for the build config file loads. | 175 // Records for the build config file loads. |
176 // Owning pointers. | 176 // Owning pointers. |
177 typedef std::map<Label, ToolchainRecord*> ToolchainRecordMap; | 177 typedef std::map<Label, ToolchainRecord*> ToolchainRecordMap; |
178 ToolchainRecordMap toolchain_records_; | 178 ToolchainRecordMap toolchain_records_; |
179 }; | 179 }; |
180 | 180 |
181 #endif // TOOLS_GN_LOADER_H_ | 181 #endif // TOOLS_GN_LOADER_H_ |
OLD | NEW |