Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / mojo / examples / surfaces_app / child_app.cc
index 215f496..c499253 100644 (file)
@@ -2,7 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "mojo/application/application_runner_chromium.h"
 #include "mojo/examples/surfaces_app/child_impl.h"
+#include "mojo/public/c/system/main.h"
 #include "mojo/public/cpp/application/application_connection.h"
 #include "mojo/public/cpp/application/application_delegate.h"
 #include "mojo/public/cpp/application/application_impl.h"
@@ -41,10 +43,9 @@ class ChildApp : public ApplicationDelegate, public InterfaceFactory<Child> {
 };
 
 }  // namespace examples
+}  // namespace mojo
 
-// static
-ApplicationDelegate* ApplicationDelegate::Create() {
-  return new examples::ChildApp();
+MojoResult MojoMain(MojoHandle shell_handle) {
+  mojo::ApplicationRunnerChromium runner(new mojo::examples::ChildApp);
+  return runner.Run(shell_handle);
 }
-
-}  // namespace mojo