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

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

Issue 1846893002: Interface with webrtc through encoded frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed sergey comment Created 4 years, 8 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_WEBRTC_CONNECTION_TO_CLIENT_H_ 5 #ifndef REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_CLIENT_H_
6 #define REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_CLIENT_H_ 6 #define REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 13 matching lines...) Expand all
24 class HostControlDispatcher; 24 class HostControlDispatcher;
25 class HostEventDispatcher; 25 class HostEventDispatcher;
26 26
27 class WebrtcConnectionToClient : public ConnectionToClient, 27 class WebrtcConnectionToClient : public ConnectionToClient,
28 public Session::EventHandler, 28 public Session::EventHandler,
29 public WebrtcTransport::EventHandler, 29 public WebrtcTransport::EventHandler,
30 public ChannelDispatcherBase::EventHandler { 30 public ChannelDispatcherBase::EventHandler {
31 public: 31 public:
32 WebrtcConnectionToClient( 32 WebrtcConnectionToClient(
33 std::unique_ptr<Session> session, 33 std::unique_ptr<Session> session,
34 scoped_refptr<protocol::TransportContext> transport_context); 34 scoped_refptr<protocol::TransportContext> transport_context,
35 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner);
35 ~WebrtcConnectionToClient() override; 36 ~WebrtcConnectionToClient() override;
36 37
37 // ConnectionToClient interface. 38 // ConnectionToClient interface.
38 void SetEventHandler( 39 void SetEventHandler(
39 ConnectionToClient::EventHandler* event_handler) override; 40 ConnectionToClient::EventHandler* event_handler) override;
40 Session* session() override; 41 Session* session() override;
41 void Disconnect(ErrorCode error) override; 42 void Disconnect(ErrorCode error) override;
42 void OnInputEventReceived(int64_t timestamp) override; 43 void OnInputEventReceived(int64_t timestamp) override;
43 std::unique_ptr<VideoStream> StartVideoStream( 44 std::unique_ptr<VideoStream> StartVideoStream(
44 std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer) override; 45 std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer) override;
(...skipping 17 matching lines...) Expand all
62 63
63 // ChannelDispatcherBase::EventHandler interface. 64 // ChannelDispatcherBase::EventHandler interface.
64 void OnChannelInitialized(ChannelDispatcherBase* channel_dispatcher) override; 65 void OnChannelInitialized(ChannelDispatcherBase* channel_dispatcher) override;
65 66
66 private: 67 private:
67 base::ThreadChecker thread_checker_; 68 base::ThreadChecker thread_checker_;
68 69
69 // Event handler for handling events sent from this object. 70 // Event handler for handling events sent from this object.
70 ConnectionToClient::EventHandler* event_handler_ = nullptr; 71 ConnectionToClient::EventHandler* event_handler_ = nullptr;
71 72
72 WebrtcTransport transport_; 73 std::unique_ptr<WebrtcTransport> transport_;
73 74
74 std::unique_ptr<Session> session_; 75 std::unique_ptr<Session> session_;
75 76
77 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner_;
78
76 std::unique_ptr<HostControlDispatcher> control_dispatcher_; 79 std::unique_ptr<HostControlDispatcher> control_dispatcher_;
77 std::unique_ptr<HostEventDispatcher> event_dispatcher_; 80 std::unique_ptr<HostEventDispatcher> event_dispatcher_;
78
79 base::WeakPtrFactory<WebrtcConnectionToClient> weak_factory_; 81 base::WeakPtrFactory<WebrtcConnectionToClient> weak_factory_;
80 82
81 DISALLOW_COPY_AND_ASSIGN(WebrtcConnectionToClient); 83 DISALLOW_COPY_AND_ASSIGN(WebrtcConnectionToClient);
82 }; 84 };
83 85
84 } // namespace protocol 86 } // namespace protocol
85 } // namespace remoting 87 } // namespace remoting
86 88
87 #endif // REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_CLIENT_H_ 89 #endif // REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_CLIENT_H_
OLDNEW
« no previous file with comments | « remoting/protocol/video_frame_pump_unittest.cc ('k') | remoting/protocol/webrtc_connection_to_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698