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

Unified Diff: ui/views/examples/content_client/examples_main.cc

Issue 190853004: Convert ContentMain to take a struct instead of parameters that vary depending on the platform. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 years, 9 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 | « content/shell/app/shell_main.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/content_client/examples_main.cc
===================================================================
--- ui/views/examples/content_client/examples_main.cc (revision 255719)
+++ ui/views/examples/content_client/examples_main.cc (working copy)
@@ -12,14 +12,21 @@
#if defined(OS_WIN)
int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) {
+#else
+int main(int argc, const char** argv) {
+#endif
+ views::examples::ExamplesMainDelegate delegate;
+ content::ContentMainParams params(&delegate);
+
+#if defined(OS_WIN)
sandbox::SandboxInterfaceInfo sandbox_info = {0};
content::InitializeSandboxInfo(&sandbox_info);
- views::examples::ExamplesMainDelegate delegate;
- return content::ContentMain(instance, &sandbox_info, &delegate);
-}
+ params.instance = instance;
+ params.sandbox_info = &sandbox_info;
#else
-int main(int argc, const char** argv) {
- views::examples::ExamplesMainDelegate delegate;
- return content::ContentMain(argc, argv, &delegate);
+ params.argc = argc;
+ params.argv = argv;
+#endif
+
+ return content::ContentMain(params);
}
-#endif
« no previous file with comments | « content/shell/app/shell_main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698