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
3 // found in the LICENSE file.
5 #ifndef IOS_WEB_PUBLIC_APP_WEB_MAIN_H_
6 #define IOS_WEB_PUBLIC_APP_WEB_MAIN_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "ios/web/public/app/web_main_delegate.h"
14 // Contains parameters passed to WebMain.
15 struct WebMainParams
{
16 explicit WebMainParams(WebMainDelegate
* delegate
) : delegate(delegate
) {}
18 WebMainDelegate
* delegate
;
21 // Encapsulates any setup and initialization that is needed by common
22 // web/ code. A single instance of this object should be created during app
23 // startup (or shortly after launch), and clients must ensure that this object
24 // is not destroyed while web/ code is still on the stack.
26 // Clients can add custom code to the startup flow by implementing the methods
27 // in WebMainDelegate and WebMainParts.
30 explicit WebMain(const WebMainParams
& params
);
34 scoped_ptr
<WebMainRunner
> web_main_runner_
;
39 #endif // IOS_WEB_PUBLIC_APP_WEB_MAIN_H_