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_SETUP_H_ | 5 #ifndef TOOLS_GN_SETUP_H_ |
6 #define TOOLS_GN_SETUP_H_ | 6 #define TOOLS_GN_SETUP_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 // The way to run both at the same time is: | 203 // The way to run both at the same time is: |
204 // dependent_setup.RunPreMessageLoop(); | 204 // dependent_setup.RunPreMessageLoop(); |
205 // main_setup.Run(); | 205 // main_setup.Run(); |
206 // dependent_setup.RunPostMessageLoop(); | 206 // dependent_setup.RunPostMessageLoop(); |
207 // so that the main setup executes the message loop, but both are run. | 207 // so that the main setup executes the message loop, but both are run. |
208 class DependentSetup : public CommonSetup { | 208 class DependentSetup : public CommonSetup { |
209 public: | 209 public: |
210 // Note: this could be one function that takes a CommonSetup*, but then | 210 // Note: this could be one function that takes a CommonSetup*, but then |
211 // the compiler can get confused what to call, since it also matches the | 211 // the compiler can get confused what to call, since it also matches the |
212 // default copy constructor. | 212 // default copy constructor. |
213 DependentSetup(Setup* derive_from); | 213 explicit DependentSetup(Setup* derive_from); |
214 DependentSetup(DependentSetup* derive_from); | 214 explicit DependentSetup(DependentSetup* derive_from); |
215 ~DependentSetup() override; | 215 ~DependentSetup() override; |
216 | 216 |
217 // These are the two parts of Run() in the regular setup, not including the | 217 // These are the two parts of Run() in the regular setup, not including the |
218 // call to actually run the message loop. | 218 // call to actually run the message loop. |
219 void RunPreMessageLoop(); | 219 void RunPreMessageLoop(); |
220 bool RunPostMessageLoop(); | 220 bool RunPostMessageLoop(); |
221 | 221 |
222 Scheduler* GetScheduler() override; | 222 Scheduler* GetScheduler() override; |
223 | 223 |
224 private: | 224 private: |
225 Scheduler* scheduler_; | 225 Scheduler* scheduler_; |
226 }; | 226 }; |
227 | 227 |
228 #endif // TOOLS_GN_SETUP_H_ | 228 #endif // TOOLS_GN_SETUP_H_ |
OLD | NEW |