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

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

Issue 399653004: Add a Mojo example apptest that runs in mojo_shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use mojo_ignore_result for RUN_ALL_TESTS(). 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 | « mojo/examples/apptest/example_client_impl.h ('k') | mojo/examples/apptest/example_service.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/apptest/example_client_impl.cc
diff --git a/mojo/public/cpp/application/lib/application_impl_standalone.cc b/mojo/examples/apptest/example_client_impl.cc
similarity index 53%
copy from mojo/public/cpp/application/lib/application_impl_standalone.cc
copy to mojo/examples/apptest/example_client_impl.cc
index dd7f6c10e89d3d9774234de4b007c0341efed9e2..a019ffa822e2497d81bf62363c01f1a427f770b6 100644
--- a/mojo/public/cpp/application/lib/application_impl_standalone.cc
+++ b/mojo/examples/apptest/example_client_impl.cc
@@ -2,12 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "mojo/public/cpp/application/application_impl.h"
+#include "mojo/examples/apptest/example_client_impl.h"
#include "mojo/public/cpp/utility/run_loop.h"
namespace mojo {
-void ApplicationImpl::Terminate() {
+ExampleClientImpl::ExampleClientImpl() : last_pong_value_(0) {}
+ExampleClientImpl::~ExampleClientImpl() {}
+
+void ExampleClientImpl::Pong(uint16_t pong_value) {
+ last_pong_value_ = pong_value;
mojo::RunLoop::current()->Quit();
}
« no previous file with comments | « mojo/examples/apptest/example_client_impl.h ('k') | mojo/examples/apptest/example_service.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698