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

Side by Side Diff: services/test_service/test_time_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_TIME_SERVICE_IMPL_H_ 5 #ifndef SERVICES_TEST_SERVICE_TEST_TIME_SERVICE_IMPL_H_
6 #define SERVICES_TEST_SERVICE_TEST_TIME_SERVICE_IMPL_H_ 6 #define SERVICES_TEST_SERVICE_TEST_TIME_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/interface_request.h" 9 #include "mojo/public/cpp/bindings/interface_request.h"
10 #include "mojo/public/cpp/bindings/strong_binding.h" 10 #include "mojo/public/cpp/bindings/strong_binding.h"
11 #include "mojo/public/cpp/system/macros.h" 11 #include "mojo/public/cpp/system/macros.h"
12 #include "services/test_service/test_service.mojom.h" 12 #include "services/test_service/test_service.mojom.h"
13 13
14 namespace mojo { 14 namespace mojo {
15
16 class ApplicationImplBase;
17
15 namespace test { 18 namespace test {
16 19
17 class TrackedService; 20 class TrackedService;
18 21
19 class TestTimeServiceImpl : public TestTimeService { 22 class TestTimeServiceImpl : public TestTimeService {
20 public: 23 public:
21 TestTimeServiceImpl(ApplicationImpl* app_impl, 24 TestTimeServiceImpl(ApplicationImplBase* application,
22 InterfaceRequest<TestTimeService> request); 25 InterfaceRequest<TestTimeService> request);
23 ~TestTimeServiceImpl() override; 26 ~TestTimeServiceImpl() override;
24 27
25 // |TestTimeService| methods: 28 // |TestTimeService| methods:
26 void GetPartyTime( 29 void GetPartyTime(
27 const mojo::Callback<void(int64_t time_usec)>& callback) override; 30 const mojo::Callback<void(int64_t time_usec)>& callback) override;
28 void StartTrackingRequests(const mojo::Callback<void()>& callback) override; 31 void StartTrackingRequests(const mojo::Callback<void()>& callback) override;
29 32
30 private: 33 private:
31 ApplicationImpl* app_impl_; 34 ApplicationImplBase* const application_;
32 scoped_ptr<TrackedService> tracking_; 35 scoped_ptr<TrackedService> tracking_;
33 StrongBinding<TestTimeService> binding_; 36 StrongBinding<TestTimeService> binding_;
34 MOJO_DISALLOW_COPY_AND_ASSIGN(TestTimeServiceImpl); 37 MOJO_DISALLOW_COPY_AND_ASSIGN(TestTimeServiceImpl);
35 }; 38 };
36 39
37 } // namespace test 40 } // namespace test
38 } // namespace mojo 41 } // namespace mojo
39 42
40 #endif // SERVICES_TEST_SERVICE_TEST_TIME_SERVICE_IMPL_H_ 43 #endif // SERVICES_TEST_SERVICE_TEST_TIME_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « services/test_service/test_service_impl.cc ('k') | services/test_service/test_time_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698