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 MEDIA_MOJO_SERVICES_MOJO_MEDIA_LOG_H_ |
| 6 #define MEDIA_MOJO_SERVICES_MOJO_MEDIA_LOG_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "media/base/media_log.h" |
| 12 #include "media/mojo/interfaces/media_log.mojom.h" |
| 13 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" |
| 14 |
| 15 namespace media { |
| 16 |
| 17 class MojoMediaLog final : public MediaLog { |
| 18 public: |
| 19 // TODO(sandersd): Template on Ptr type to support non-associated. |
| 20 explicit MojoMediaLog( |
| 21 mojo::AssociatedInterfacePtr<mojom::MediaLog> remote_media_log); |
| 22 ~MojoMediaLog() final; |
| 23 |
| 24 // MediaLog implementation. |
| 25 void AddEvent(std::unique_ptr<MediaLogEvent> event) override; |
| 26 |
| 27 private: |
| 28 mojo::AssociatedInterfacePtr<mojom::MediaLog> remote_media_log_; |
| 29 |
| 30 DISALLOW_COPY_AND_ASSIGN(MojoMediaLog); |
| 31 }; |
| 32 |
| 33 } // namespace media |
| 34 |
| 35 #endif // MEDIA_MOJO_SERVICES_MOJO_MEDIA_LOG_H_ |
OLD | NEW |