| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 IOS_WEB_PUBLIC_APP_WEB_MAIN_H_ | 5 #ifndef IOS_WEB_PUBLIC_APP_WEB_MAIN_H_ |
| 6 #define IOS_WEB_PUBLIC_APP_WEB_MAIN_H_ | 6 #define IOS_WEB_PUBLIC_APP_WEB_MAIN_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include <memory> |
| 9 |
| 9 #include "ios/web/public/app/web_main_delegate.h" | 10 #include "ios/web/public/app/web_main_delegate.h" |
| 10 | 11 |
| 11 namespace web { | 12 namespace web { |
| 12 class WebMainRunner; | 13 class WebMainRunner; |
| 13 | 14 |
| 14 // Contains parameters passed to WebMain. | 15 // Contains parameters passed to WebMain. |
| 15 struct WebMainParams { | 16 struct WebMainParams { |
| 16 explicit WebMainParams(WebMainDelegate* delegate) | 17 explicit WebMainParams(WebMainDelegate* delegate) |
| 17 : delegate(delegate), | 18 : delegate(delegate), |
| 18 register_exit_manager(true), | 19 register_exit_manager(true), |
| (...skipping 14 matching lines...) Expand all Loading... |
| 33 // is not destroyed while web/ code is still on the stack. | 34 // is not destroyed while web/ code is still on the stack. |
| 34 // | 35 // |
| 35 // Clients can add custom code to the startup flow by implementing the methods | 36 // Clients can add custom code to the startup flow by implementing the methods |
| 36 // in WebMainDelegate and WebMainParts. | 37 // in WebMainDelegate and WebMainParts. |
| 37 class WebMain { | 38 class WebMain { |
| 38 public: | 39 public: |
| 39 explicit WebMain(const WebMainParams& params); | 40 explicit WebMain(const WebMainParams& params); |
| 40 ~WebMain(); | 41 ~WebMain(); |
| 41 | 42 |
| 42 private: | 43 private: |
| 43 scoped_ptr<WebMainRunner> web_main_runner_; | 44 std::unique_ptr<WebMainRunner> web_main_runner_; |
| 44 }; | 45 }; |
| 45 | 46 |
| 46 } // namespace web | 47 } // namespace web |
| 47 | 48 |
| 48 #endif // IOS_WEB_PUBLIC_APP_WEB_MAIN_H_ | 49 #endif // IOS_WEB_PUBLIC_APP_WEB_MAIN_H_ |
| OLD | NEW |