Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(908)

Side by Side Diff: remoting/protocol/fake_connection_to_client.h

Issue 2083843002: Replace VideoStream::SizeCallback with VideoStream::Observer interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@merge-sched-stream
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 REMOTING_PROTOCOL_FAKE_CONNECTION_TO_CLIENT_H_ 5 #ifndef REMOTING_PROTOCOL_FAKE_CONNECTION_TO_CLIENT_H_
6 #define REMOTING_PROTOCOL_FAKE_CONNECTION_TO_CLIENT_H_ 6 #define REMOTING_PROTOCOL_FAKE_CONNECTION_TO_CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 12 matching lines...) Expand all
23 class FakeVideoStream : public protocol::VideoStream { 23 class FakeVideoStream : public protocol::VideoStream {
24 public: 24 public:
25 FakeVideoStream(); 25 FakeVideoStream();
26 ~FakeVideoStream() override; 26 ~FakeVideoStream() override;
27 27
28 // protocol::VideoStream interface. 28 // protocol::VideoStream interface.
29 void Pause(bool pause) override; 29 void Pause(bool pause) override;
30 void OnInputEventReceived(int64_t event_timestamp) override; 30 void OnInputEventReceived(int64_t event_timestamp) override;
31 void SetLosslessEncode(bool want_lossless) override; 31 void SetLosslessEncode(bool want_lossless) override;
32 void SetLosslessColor(bool want_lossless) override; 32 void SetLosslessColor(bool want_lossless) override;
33 void SetSizeCallback(const SizeCallback& size_callback) override; 33 void SetObserver(Observer* observer) override;
34 34
35 const SizeCallback& size_callback() { return size_callback_; } 35 Observer* observer() { return observer_; }
36 36
37 base::WeakPtr<FakeVideoStream> GetWeakPtr(); 37 base::WeakPtr<FakeVideoStream> GetWeakPtr();
38 38
39 private: 39 private:
40 SizeCallback size_callback_; 40 Observer* observer_ = nullptr;
41 41
42 base::WeakPtrFactory<FakeVideoStream> weak_factory_; 42 base::WeakPtrFactory<FakeVideoStream> weak_factory_;
43 43
44 DISALLOW_COPY_AND_ASSIGN(FakeVideoStream); 44 DISALLOW_COPY_AND_ASSIGN(FakeVideoStream);
45 }; 45 };
46 46
47 class FakeConnectionToClient : public ConnectionToClient { 47 class FakeConnectionToClient : public ConnectionToClient {
48 public: 48 public:
49 FakeConnectionToClient(std::unique_ptr<Session> session); 49 FakeConnectionToClient(std::unique_ptr<Session> session);
50 ~FakeConnectionToClient() override; 50 ~FakeConnectionToClient() override;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 bool is_connected_ = true; 107 bool is_connected_ = true;
108 ErrorCode disconnect_error_ = OK; 108 ErrorCode disconnect_error_ = OK;
109 109
110 DISALLOW_COPY_AND_ASSIGN(FakeConnectionToClient); 110 DISALLOW_COPY_AND_ASSIGN(FakeConnectionToClient);
111 }; 111 };
112 112
113 } // namespace protocol 113 } // namespace protocol
114 } // namespace remoting 114 } // namespace remoting
115 115
116 #endif // REMOTING_PROTOCOL_FAKE_CONNECTION_TO_CLIENT_H_ 116 #endif // REMOTING_PROTOCOL_FAKE_CONNECTION_TO_CLIENT_H_
OLDNEW
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/protocol/fake_connection_to_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698