OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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. |
| 4 |
| 5 #ifndef SERVICES_BLAMER_BLAMER_SERVICE_H_ |
| 6 #define SERVICES_BLAMER_BLAMER_SERVICE_H_ |
| 7 |
| 8 #include "base/memory/weak_ptr.h" |
| 9 #include "services/service_manager/public/cpp/service.h" |
| 10 #include "services/service_manager/public/cpp/service_context_ref.h" |
| 11 |
| 12 namespace blamer { |
| 13 |
| 14 class BlamerService : public service_manager::Service { |
| 15 public: |
| 16 BlamerService(); |
| 17 ~BlamerService() override; |
| 18 |
| 19 // service_manager::Service: |
| 20 static std::unique_ptr<service_manager::Service> Create(); |
| 21 void OnStart() override; |
| 22 bool OnConnect(const service_manager::ServiceInfo& remote_info, |
| 23 service_manager::InterfaceRegistry* registry) override; |
| 24 |
| 25 private: |
| 26 |
| 27 std::unique_ptr<service_manager::ServiceContextRefFactory> ref_factory_; |
| 28 base::WeakPtrFactory<BlamerService> weak_factory_; |
| 29 |
| 30 DISALLOW_COPY_AND_ASSIGN(BlamerService); |
| 31 }; |
| 32 |
| 33 } // namespace blamer |
| 34 |
| 35 #endif // SERVICES_BLAMER_BLAMER_SERVICE_H_ |
OLD | NEW |