Chromium Code Reviews

Side by Side Diff: services/test_service/test_request_tracker_application.h

Issue 2004493002: Add a mojo::RunApplication() for running implementations of ApplicationImplBase. (Closed) Base URL: https://github.com/domokit/mojo.git@work790_environment_no_instantiate
Patch Set: rebased Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SERVICES_TEST_SERVICE_TEST_REQUEST_TRACKER_APPLICATION_H_ 5 #ifndef SERVICES_TEST_SERVICE_TEST_REQUEST_TRACKER_APPLICATION_H_
6 #define SERVICES_TEST_SERVICE_TEST_REQUEST_TRACKER_APPLICATION_H_ 6 #define SERVICES_TEST_SERVICE_TEST_REQUEST_TRACKER_APPLICATION_H_
7 7
8 #include "mojo/public/cpp/application/application_delegate.h" 8 #include "mojo/public/cpp/application/application_impl_base.h"
9 #include "mojo/public/cpp/system/macros.h" 9 #include "mojo/public/cpp/system/macros.h"
10 #include "services/test_service/test_request_tracker_impl.h" 10 #include "services/test_service/test_request_tracker_impl.h"
11 11
12 namespace mojo { 12 namespace mojo {
13 class ApplicationImpl;
14 namespace test { 13 namespace test {
14
15 class TestTimeService; 15 class TestTimeService;
16 16
17 // Embeds TestRequestTracker mojo services into an application. 17 // Embeds TestRequestTracker mojo services into an application.
18 class TestRequestTrackerApplication : public ApplicationDelegate { 18 class TestRequestTrackerApplication : public ApplicationImplBase {
19 public: 19 public:
20 TestRequestTrackerApplication(); 20 TestRequestTrackerApplication();
21 ~TestRequestTrackerApplication() override; 21 ~TestRequestTrackerApplication() override;
22 22
23 void Initialize(ApplicationImpl* app) override; 23 // |ApplicationImplBase| method:
24 24 bool OnAcceptConnection(ServiceProviderImpl* service_provider_impl) override;
25 // ApplicationDelegate methods:
26 bool ConfigureIncomingConnection(
27 ServiceProviderImpl* service_provider_impl) override;
28 25
29 private: 26 private:
30 ApplicationImpl* app_impl_;
31 TrackingContext context_; 27 TrackingContext context_;
32 MOJO_DISALLOW_COPY_AND_ASSIGN(TestRequestTrackerApplication); 28 MOJO_DISALLOW_COPY_AND_ASSIGN(TestRequestTrackerApplication);
33 }; 29 };
34 30
35 } // namespace test 31 } // namespace test
36 } // namespace mojo 32 } // namespace mojo
37 33
38 #endif // SERVICES_TEST_SERVICE_TEST_REQUEST_TRACKER_APPLICATION_H_ 34 #endif // SERVICES_TEST_SERVICE_TEST_REQUEST_TRACKER_APPLICATION_H_
OLDNEW
« no previous file with comments | « mojo/services/log/cpp/log_client.h ('k') | services/test_service/test_request_tracker_application.cc » ('j') | no next file with comments »

Powered by Google App Engine