| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 MEDIA_REMOTING_FAKE_REMOTING_CONTROLLER_H_ | 5 #ifndef MEDIA_REMOTING_FAKE_REMOTER_H_ |
| 6 #define MEDIA_REMOTING_FAKE_REMOTING_CONTROLLER_H_ | 6 #define MEDIA_REMOTING_FAKE_REMOTER_H_ |
| 7 | 7 |
| 8 #include "media/base/decoder_buffer.h" | 8 #include "media/base/decoder_buffer.h" |
| 9 #include "media/mojo/interfaces/remoting.mojom.h" | 9 #include "media/mojo/interfaces/remoting.mojom.h" |
| 10 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
| 11 | 11 |
| 12 namespace media { | 12 namespace media { |
| 13 namespace remoting { |
| 13 | 14 |
| 14 class RemotingSourceImpl; | 15 class SharedSession; |
| 15 | 16 |
| 16 class FakeRemotingDataStreamSender : public mojom::RemotingDataStreamSender { | 17 class FakeRemotingDataStreamSender : public mojom::RemotingDataStreamSender { |
| 17 public: | 18 public: |
| 18 FakeRemotingDataStreamSender( | 19 FakeRemotingDataStreamSender( |
| 19 mojom::RemotingDataStreamSenderRequest request, | 20 mojom::RemotingDataStreamSenderRequest request, |
| 20 mojo::ScopedDataPipeConsumerHandle consumer_handle); | 21 mojo::ScopedDataPipeConsumerHandle consumer_handle); |
| 21 ~FakeRemotingDataStreamSender() override; | 22 ~FakeRemotingDataStreamSender() override; |
| 22 | 23 |
| 23 uint32_t consume_data_chunk_count() const { | 24 uint32_t consume_data_chunk_count() const { |
| 24 return consume_data_chunk_count_; | 25 return consume_data_chunk_count_; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 class FakeRemoterFactory final : public mojom::RemoterFactory { | 87 class FakeRemoterFactory final : public mojom::RemoterFactory { |
| 87 public: | 88 public: |
| 88 // |start_will_fail| indicates whether starting remoting will fail. | 89 // |start_will_fail| indicates whether starting remoting will fail. |
| 89 explicit FakeRemoterFactory(bool start_will_fail); | 90 explicit FakeRemoterFactory(bool start_will_fail); |
| 90 ~FakeRemoterFactory() override; | 91 ~FakeRemoterFactory() override; |
| 91 | 92 |
| 92 // mojom::RemoterFactory implementation. | 93 // mojom::RemoterFactory implementation. |
| 93 void Create(mojom::RemotingSourcePtr source, | 94 void Create(mojom::RemotingSourcePtr source, |
| 94 mojom::RemoterRequest request) override; | 95 mojom::RemoterRequest request) override; |
| 95 | 96 |
| 97 static scoped_refptr<SharedSession> CreateSharedSession(bool start_will_fail); |
| 98 |
| 96 private: | 99 private: |
| 97 bool start_will_fail_; | 100 bool start_will_fail_; |
| 98 | 101 |
| 99 DISALLOW_COPY_AND_ASSIGN(FakeRemoterFactory); | 102 DISALLOW_COPY_AND_ASSIGN(FakeRemoterFactory); |
| 100 }; | 103 }; |
| 101 | 104 |
| 102 scoped_refptr<RemotingSourceImpl> CreateRemotingSourceImpl( | 105 } // namespace remoting |
| 103 bool start_will_fail); | |
| 104 | |
| 105 } // namespace media | 106 } // namespace media |
| 106 | 107 |
| 107 #endif // MEDIA_REMOTING_FAKE_REMOTING_CONTROLLER_H_ | 108 #endif // MEDIA_REMOTING_FAKE_REMOTER_H_ |
| OLD | NEW |