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

Unified Diff: mojo/examples/png_viewer/png_viewer.cc

Issue 441853002: mojo: first take on removing mojo_main_{chromium,standalone}. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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
Index: mojo/examples/png_viewer/png_viewer.cc
diff --git a/mojo/examples/png_viewer/png_viewer.cc b/mojo/examples/png_viewer/png_viewer.cc
index f3ff759604020a44eeaa17777dea6f1236846c7a..90074e4ae6d288ede175fdc71e916bd28a945f3c 100644
--- a/mojo/examples/png_viewer/png_viewer.cc
+++ b/mojo/examples/png_viewer/png_viewer.cc
@@ -9,6 +9,8 @@
#include "mojo/examples/media_viewer/media_viewer.mojom.h"
#include "mojo/public/cpp/application/application_connection.h"
#include "mojo/public/cpp/application/application_delegate.h"
+#include "mojo/public/cpp/application/application_export.h"
+#include "mojo/public/cpp/application/application_runner_chromium.h"
#include "mojo/public/cpp/application/interface_factory_impl.h"
#include "mojo/services/public/cpp/view_manager/node.h"
#include "mojo/services/public/cpp/view_manager/node_observer.h"
@@ -246,10 +248,11 @@ void NavigatorImpl::UpdateView(Id node_id,
}
} // namespace examples
+} // namespace mojo
-// static
-ApplicationDelegate* ApplicationDelegate::Create() {
- return new examples::PNGViewer;
+extern "C" APPLICATION_EXPORT MojoResult CDECL MojoMain(
+ MojoHandle shell_handle) {
+ mojo::ApplicationRunnerChromium app;
+ app.take_delegate(make_scoped_delegate(new mojo::examples::PNGViewer));
+ return app.Run(shell_handle);
}
-
-} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698