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

Side by Side Diff: mojo/services/test_service/test_monitoring_application.cc

Issue 349303006: mojo: add some end-to-end shell tests and a new test sample app (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ServiceProvider rebase Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "mojo/services/test_service/test_monitoring_application.h"
6
7 #include <assert.h>
8
9 #include "mojo/public/cpp/application/application_connection.h"
10 #include "mojo/services/test_service/test_time_service_impl.h"
11
12 namespace mojo {
13 namespace test {
14
15 TestMonitoringApplication::TestMonitoringApplication() {
16 }
17
18 TestMonitoringApplication::~TestMonitoringApplication() {
19 }
20
21 bool TestMonitoringApplication::ConfigureIncomingConnection(
22 ApplicationConnection* connection) {
23 // Every instance of the service and recorder shares the context.
24 // Note, this app is single-threaded, so this is thread safe.
25 connection->AddService<ToyMonitoringServiceImpl>(&context_);
26 connection->AddService<ToyMonitoringServiceRecorderImpl>(&context_);
27 connection->AddService<TestTimeServiceImpl>();
28 return true;
29 }
30
31 } // namespace test
32
33 // static
34 ApplicationDelegate* ApplicationDelegate::Create() {
35 return new mojo::test::TestMonitoringApplication();
36 }
37
38 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698