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

Unified Diff: mojo/examples/apptest/example_apptest.cc

Issue 441853002: mojo: first take on removing mojo_main_{chromium,standalone}. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gn 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
« no previous file with comments | « no previous file | mojo/examples/apptest/example_client_application.cc » ('j') | mojo/public/cpp/system/main.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/apptest/example_apptest.cc
diff --git a/mojo/examples/apptest/example_apptest.cc b/mojo/examples/apptest/example_apptest.cc
index 2324b14417b8ad31a9a2314903952cca4087c9ec..6990ebdc13c1945e2dbaaa9521eb46a9d1c63bcb 100644
--- a/mojo/examples/apptest/example_apptest.cc
+++ b/mojo/examples/apptest/example_apptest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "mojo/examples/apptest/example_client_application.h"
#include "mojo/examples/apptest/example_client_impl.h"
#include "mojo/examples/apptest/example_service.mojom.h"
#include "mojo/public/cpp/application/application_delegate.h"
@@ -9,6 +10,7 @@
#include "mojo/public/cpp/bindings/callback.h"
#include "mojo/public/cpp/environment/environment.h"
#include "mojo/public/cpp/system/macros.h"
+#include "mojo/public/cpp/system/main.h"
#include "mojo/public/cpp/utility/run_loop.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -71,14 +73,14 @@ TEST_F(ExampleServiceTest, RunCallback) {
} // namespace mojo
-extern "C" APPLICATION_EXPORT MojoResult CDECL MojoMain(
- MojoHandle shell_handle) {
+MojoResult MojoMain(MojoHandle shell_handle) {
mojo::Environment env;
mojo::RunLoop loop;
- mojo::ApplicationDelegate* delegate = mojo::ApplicationDelegate::Create();
- mojo::ApplicationImpl app(delegate);
- app.BindShell(shell_handle);
+ // TODO(tim): Perhaps the delegate should be the thing that provides
+ // the ExampleServiceTest with the ApplicationImpl somehow.
+ mojo::ApplicationDelegate* delegate = new mojo::ExampleClientApplication();
+ mojo::ApplicationImpl app(delegate, shell_handle);
g_application_impl_hack = &app;
// TODO(msw): Get actual commandline arguments.
« no previous file with comments | « no previous file | mojo/examples/apptest/example_client_application.cc » ('j') | mojo/public/cpp/system/main.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698