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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 LoaderImpl(const BuildSettings* build_settings); |
83 | 83 |
84 // Loader implementation. | 84 // Loader implementation. |
85 virtual void Load(const SourceFile& file, | 85 virtual 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 virtual void ToolchainLoaded(const Toolchain* toolchain) OVERRIDE; | 88 virtual void ToolchainLoaded(const Toolchain* toolchain) override; |
89 virtual Label GetDefaultToolchain() const OVERRIDE; | 89 virtual Label GetDefaultToolchain() const override; |
90 virtual const Settings* GetToolchainSettings( | 90 virtual const Settings* GetToolchainSettings( |
91 const Label& label) const OVERRIDE; | 91 const Label& label) const override; |
92 | 92 |
93 // Sets the message loop corresponding to the main thread. By default this | 93 // Sets the message loop corresponding to the main thread. By default this |
94 // class will use the thread active during construction, but there is not | 94 // class will use the thread active during construction, but there is not |
95 // a message loop active during construction all the time. | 95 // a message loop active during construction all the time. |
96 void set_main_loop(base::MessageLoop* loop) { main_loop_ = loop; } | 96 void set_main_loop(base::MessageLoop* loop) { main_loop_ = loop; } |
97 | 97 |
98 // The complete callback is called whenever there are no more pending loads. | 98 // The complete callback is called whenever there are no more pending loads. |
99 // Called on the main thread only. This may be called more than once if the | 99 // Called on the main thread only. This may be called more than once if the |
100 // queue is drained, but then more stuff gets added. | 100 // queue is drained, but then more stuff gets added. |
101 void set_complete_callback(const base::Closure& cb) { | 101 void set_complete_callback(const base::Closure& cb) { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 const BuildSettings* build_settings_; | 173 const BuildSettings* build_settings_; |
174 Label default_toolchain_label_; | 174 Label default_toolchain_label_; |
175 | 175 |
176 // Records for the build config file loads. | 176 // Records for the build config file loads. |
177 // Owning pointers. | 177 // Owning pointers. |
178 typedef std::map<Label, ToolchainRecord*> ToolchainRecordMap; | 178 typedef std::map<Label, ToolchainRecord*> ToolchainRecordMap; |
179 ToolchainRecordMap toolchain_records_; | 179 ToolchainRecordMap toolchain_records_; |
180 }; | 180 }; |
181 | 181 |
182 #endif // TOOLS_GN_LOADER_H_ | 182 #endif // TOOLS_GN_LOADER_H_ |
OLD | NEW |