OLD | NEW |
(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_request_tracker_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 TestRequestTrackerApplication::TestRequestTrackerApplication() { |
| 16 } |
| 17 |
| 18 TestRequestTrackerApplication::~TestRequestTrackerApplication() { |
| 19 } |
| 20 |
| 21 bool TestRequestTrackerApplication::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<TestTrackedRequestServiceImpl>(&context_); |
| 26 connection->AddService<TestRequestTrackerImpl>(&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::TestRequestTrackerApplication(); |
| 36 } |
| 37 |
| 38 } // namespace mojo |
OLD | NEW |