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

Side by Side Diff: services/test_service/test_service_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. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
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_SERVICE_APPLICATION_H_ 5 #ifndef SERVICES_TEST_SERVICE_TEST_SERVICE_APPLICATION_H_
6 #define SERVICES_TEST_SERVICE_TEST_SERVICE_APPLICATION_H_ 6 #define SERVICES_TEST_SERVICE_TEST_SERVICE_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 10
11 namespace mojo { 11 namespace mojo {
12 namespace test { 12 namespace test {
13 13
14 class TestService; 14 class TestServiceApplication : public ApplicationImplBase {
15 class TestTimeService;
16
17 class TestServiceApplication : public ApplicationDelegate {
18 public: 15 public:
19 TestServiceApplication(); 16 TestServiceApplication();
20 ~TestServiceApplication() override; 17 ~TestServiceApplication() override;
21 18
22 void Initialize(ApplicationImpl* app) override; 19 // |ApplicationImplBase| method:
23 20 bool OnAcceptConnection(ServiceProviderImpl* service_provider_impl) override;
24 // ApplicationDelegate implementation.
25 bool ConfigureIncomingConnection(
26 ServiceProviderImpl* service_provider_impl) override;
27 21
28 void AddRef(); 22 void AddRef();
29 void ReleaseRef(); 23 void ReleaseRef();
30 24
31 private: 25 private:
32 int ref_count_; 26 int ref_count_;
33 ApplicationImpl* app_impl_;
34 27
35 MOJO_DISALLOW_COPY_AND_ASSIGN(TestServiceApplication); 28 MOJO_DISALLOW_COPY_AND_ASSIGN(TestServiceApplication);
36 }; 29 };
37 30
38 } // namespace test 31 } // namespace test
39 } // namespace mojo 32 } // namespace mojo
40 33
41 #endif // SERVICES_TEST_SERVICE_TEST_SERVICE_APPLICATION_H_ 34 #endif // SERVICES_TEST_SERVICE_TEST_SERVICE_APPLICATION_H_
OLDNEW
« no previous file with comments | « services/test_service/test_request_tracker_application.cc ('k') | services/test_service/test_service_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698