Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Unified Diff: ios/web/public/app/web_main.h

Issue 1149323004: Upstream the iOS web_shell and supporting code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web-thread-impl
Patch Set: Address review comments Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/ios_web_shell.gyp ('k') | ios/web/public/app/web_main_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/app/web_main.h
diff --git a/ios/web/public/app/web_main.h b/ios/web/public/app/web_main.h
new file mode 100644
index 0000000000000000000000000000000000000000..b5d651cd6686eb41e8e29319c198ff2962dbe9aa
--- /dev/null
+++ b/ios/web/public/app/web_main.h
@@ -0,0 +1,39 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_WEB_PUBLIC_APP_WEB_MAIN_H_
+#define IOS_WEB_PUBLIC_APP_WEB_MAIN_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "ios/web/public/app/web_main_delegate.h"
+
+namespace web {
+class WebMainRunner;
+
+// Contains parameters passed to WebMain.
+struct WebMainParams {
+ explicit WebMainParams(WebMainDelegate* delegate) : delegate(delegate) {}
+
+ WebMainDelegate* delegate;
+};
+
+// Encapsulates any setup and initialization that is needed by common
+// web/ code. A single instance of this object should be created during app
+// startup (or shortly after launch), and clients must ensure that this object
+// is not destroyed while web/ code is still on the stack.
+//
+// Clients can add custom code to the startup flow by implementing the methods
+// in WebMainDelegate and WebMainParts.
+class WebMain {
+ public:
+ explicit WebMain(const WebMainParams& params);
+ ~WebMain();
+
+ private:
+ scoped_ptr<WebMainRunner> web_main_runner_;
+};
+
+} // namespace web
+
+#endif // IOS_WEB_PUBLIC_APP_WEB_MAIN_H_
« no previous file with comments | « ios/web/ios_web_shell.gyp ('k') | ios/web/public/app/web_main_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698