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

Side by Side Diff: services/test_service/test_service_impl.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_IMPL_H_ 5 #ifndef SERVICES_TEST_SERVICE_TEST_SERVICE_IMPL_H_
6 #define SERVICES_TEST_SERVICE_TEST_SERVICE_IMPL_H_ 6 #define SERVICES_TEST_SERVICE_TEST_SERVICE_IMPL_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "mojo/public/cpp/bindings/strong_binding.h" 9 #include "mojo/public/cpp/bindings/strong_binding.h"
10 #include "mojo/public/cpp/system/macros.h" 10 #include "mojo/public/cpp/system/macros.h"
11 #include "services/test_service/test_service.mojom.h" 11 #include "services/test_service/test_service.mojom.h"
12 12
13 namespace mojo { 13 namespace mojo {
14 class ApplicationImpl;
15 namespace test { 14 namespace test {
16 15
17 class TrackedService; 16 class TrackedService;
18 class TestServiceApplication; 17 class TestServiceApplication;
19 18
20 class TestServiceImpl : public TestService { 19 class TestServiceImpl : public TestService {
21 public: 20 public:
22 TestServiceImpl(ApplicationImpl* app_impl, 21 TestServiceImpl(TestServiceApplication* application,
23 TestServiceApplication* application,
24 InterfaceRequest<TestService> request); 22 InterfaceRequest<TestService> request);
25 ~TestServiceImpl() override; 23 ~TestServiceImpl() override;
26 24
27 // |TestService| methods: 25 // |TestService| methods:
28 void Ping(const mojo::Callback<void()>& callback) override; 26 void Ping(const mojo::Callback<void()>& callback) override;
29 void ConnectToAppAndGetTime( 27 void ConnectToAppAndGetTime(
30 const mojo::String& app_url, 28 const mojo::String& app_url,
31 const mojo::Callback<void(int64_t)>& callback) override; 29 const mojo::Callback<void(int64_t)>& callback) override;
32 void StartTrackingRequests(const mojo::Callback<void()>& callback) override; 30 void StartTrackingRequests(const mojo::Callback<void()>& callback) override;
33 31
34 private: 32 private:
35 TestServiceApplication* const application_; 33 TestServiceApplication* const application_;
36 ApplicationImpl* const app_impl_;
37 TestTimeServicePtr time_service_; 34 TestTimeServicePtr time_service_;
38 scoped_ptr<TrackedService> tracking_; 35 scoped_ptr<TrackedService> tracking_;
39 StrongBinding<TestService> binding_; 36 StrongBinding<TestService> binding_;
40 37
41 MOJO_DISALLOW_COPY_AND_ASSIGN(TestServiceImpl); 38 MOJO_DISALLOW_COPY_AND_ASSIGN(TestServiceImpl);
42 }; 39 };
43 40
44 } // namespace test 41 } // namespace test
45 } // namespace mojo 42 } // namespace mojo
46 43
47 #endif // SERVICES_TEST_SERVICE_TEST_SERVICE_IMPL_H_ 44 #endif // SERVICES_TEST_SERVICE_TEST_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « services/test_service/test_service_application.cc ('k') | services/test_service/test_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698