| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 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 MOJO_SERVICES_FLOG_FLOG_LOGGER_IMPL_H_ |
| 6 #define MOJO_SERVICES_FLOG_FLOG_LOGGER_IMPL_H_ |
| 7 |
| 8 #include <memory> |
| 9 #include <vector> |
| 10 |
| 11 #include "mojo/public/cpp/bindings/binding.h" |
| 12 #include "services/flog/flog_directory.h" |
| 13 #include "services/flog/flog_service_impl.h" |
| 14 |
| 15 namespace mojo { |
| 16 namespace flog { |
| 17 |
| 18 // FlogLogger implementation. |
| 19 class FlogLoggerImpl : public FlogServiceImpl::ProductBase, |
| 20 MessageReceiverWithResponderStatus { |
| 21 public: |
| 22 static std::shared_ptr<FlogLoggerImpl> Create( |
| 23 InterfaceRequest<FlogLogger> request, |
| 24 uint32_t log_id, |
| 25 const std::string& label, |
| 26 std::shared_ptr<FlogDirectory> directory, |
| 27 FlogServiceImpl* owner); |
| 28 |
| 29 ~FlogLoggerImpl() override; |
| 30 |
| 31 // MessageReceiverWithResponderStatus implementation. |
| 32 bool Accept(Message* message) override; |
| 33 |
| 34 bool AcceptWithResponder(Message* message, |
| 35 MessageReceiverWithStatus* responder) override; |
| 36 |
| 37 private: |
| 38 FlogLoggerImpl(InterfaceRequest<FlogLogger> request, |
| 39 uint32_t log_id, |
| 40 const std::string& label, |
| 41 std::shared_ptr<FlogDirectory> directory, |
| 42 FlogServiceImpl* owner); |
| 43 |
| 44 void WriteData(uint32_t data_size, const void* data); |
| 45 |
| 46 std::unique_ptr<mojo::internal::Router> router_; |
| 47 files::FilePtr file_; |
| 48 }; |
| 49 |
| 50 } // namespace flog |
| 51 } // namespace mojo |
| 52 |
| 53 #endif // MOJO_SERVICES_FLOG_FLOG_LOGGER_IMPL_H_ |
| OLD | NEW |