OLD | NEW |
(Empty) | |
| 1 // Copyright 2012 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. |
| 4 |
| 5 #ifndef IOS_CHROME_APP_STARTUP_IOS_CHROME_MAIN_H_ |
| 6 #define IOS_CHROME_APP_STARTUP_IOS_CHROME_MAIN_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "ios/chrome/app/startup/ios_chrome_main_delegate.h" |
| 11 |
| 12 namespace base { |
| 13 class Time; |
| 14 } |
| 15 |
| 16 namespace web { |
| 17 class WebMainRunner; |
| 18 } |
| 19 |
| 20 // Encapsulates any setup and initialization that is needed by common |
| 21 // Chrome code. A single instance of this object should be created during app |
| 22 // startup (or shortly after launch), and clients must ensure that this object |
| 23 // is not destroyed while Chrome code is still on the stack. |
| 24 class IOSChromeMain { |
| 25 public: |
| 26 IOSChromeMain(); |
| 27 ~IOSChromeMain(); |
| 28 |
| 29 // The time main() starts. Only call from main(). |
| 30 static void InitStartTime(); |
| 31 |
| 32 // Returns the time that main() started. Used for performance tests. |
| 33 // InitStartTime() must has been called before. |
| 34 static const base::Time& StartTime(); |
| 35 |
| 36 private: |
| 37 IOSChromeMainDelegate main_delegate_; |
| 38 std::unique_ptr<web::WebMainRunner> web_main_runner_; |
| 39 }; |
| 40 |
| 41 #endif // IOS_CHROME_APP_STARTUP_IOS_CHROME_MAIN_H_ |
OLD | NEW |