Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / mojo / services / test_service / test_service_impl.h
blobc6680a29e75d51c4e532c5c1c4cf05c78be56e1b
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.
5 #ifndef SERVICES_TEST_SERVICE_TEST_SERVICE_IMPL_H_
6 #define SERVICES_TEST_SERVICE_TEST_SERVICE_IMPL_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "mojo/public/cpp/bindings/strong_binding.h"
10 #include "mojo/public/cpp/system/macros.h"
11 #include "mojo/services/test_service/test_service.mojom.h"
13 namespace mojo {
14 class ApplicationImpl;
15 namespace test {
17 class TrackedService;
18 class TestServiceApplication;
20 class TestServiceImpl : public TestService {
21 public:
22 TestServiceImpl(ApplicationImpl* app_impl,
23 TestServiceApplication* application,
24 InterfaceRequest<TestService> request);
25 ~TestServiceImpl() override;
27 // |TestService| methods:
28 void Ping(const mojo::Callback<void()>& callback) override;
29 void ConnectToAppAndGetTime(
30 const mojo::String& app_url,
31 const mojo::Callback<void(int64_t)>& callback) override;
32 void StartTrackingRequests(const mojo::Callback<void()>& callback) override;
34 private:
35 TestServiceApplication* const application_;
36 ApplicationImpl* const app_impl_;
37 TestTimeServicePtr time_service_;
38 scoped_ptr<TrackedService> tracking_;
39 StrongBinding<TestService> binding_;
41 MOJO_DISALLOW_COPY_AND_ASSIGN(TestServiceImpl);
44 } // namespace test
45 } // namespace mojo
47 #endif // SERVICES_TEST_SERVICE_TEST_SERVICE_IMPL_H_