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

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

Issue 2858813002: [Chromoting] Use ProcessStatsSender in host process
Patch Set: Created 3 years, 7 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>
11 #include <string> 11 #include <string>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/threading/thread_checker.h" 15 #include "base/threading/thread_checker.h"
16 #include "remoting/protocol/channel_dispatcher_base.h" 16 #include "remoting/protocol/channel_dispatcher_base.h"
17 #include "remoting/protocol/connection_to_client.h" 17 #include "remoting/protocol/connection_to_client.h"
18 #include "remoting/protocol/session.h" 18 #include "remoting/protocol/session.h"
19 #include "remoting/protocol/webrtc_transport.h" 19 #include "remoting/protocol/webrtc_transport.h"
20 20
21 namespace remoting { 21 namespace remoting {
22 namespace protocol { 22 namespace protocol {
23 23
24 class HostControlDispatcher; 24 class HostControlDispatcher;
25 class HostEventDispatcher; 25 class HostEventDispatcher;
26 class ProcessStatsDispatcher;
26 27
27 class WebrtcConnectionToClient : public ConnectionToClient, 28 class WebrtcConnectionToClient : public ConnectionToClient,
28 public Session::EventHandler, 29 public Session::EventHandler,
29 public WebrtcTransport::EventHandler, 30 public WebrtcTransport::EventHandler,
30 public ChannelDispatcherBase::EventHandler { 31 public ChannelDispatcherBase::EventHandler {
31 public: 32 public:
32 WebrtcConnectionToClient( 33 WebrtcConnectionToClient(
33 std::unique_ptr<Session> session, 34 std::unique_ptr<Session> session,
34 scoped_refptr<protocol::TransportContext> transport_context, 35 scoped_refptr<protocol::TransportContext> transport_context,
35 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner, 36 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner,
36 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner); 37 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner);
37 ~WebrtcConnectionToClient() override; 38 ~WebrtcConnectionToClient() override;
38 39
39 // ConnectionToClient interface. 40 // ConnectionToClient interface.
40 void SetEventHandler( 41 void SetEventHandler(
41 ConnectionToClient::EventHandler* event_handler) override; 42 ConnectionToClient::EventHandler* event_handler) override;
42 Session* session() override; 43 Session* session() override;
43 void Disconnect(ErrorCode error) override; 44 void Disconnect(ErrorCode error) override;
44 std::unique_ptr<VideoStream> StartVideoStream( 45 std::unique_ptr<VideoStream> StartVideoStream(
45 std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer) override; 46 std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer) override;
46 std::unique_ptr<AudioStream> StartAudioStream( 47 std::unique_ptr<AudioStream> StartAudioStream(
47 std::unique_ptr<AudioSource> audio_source) override; 48 std::unique_ptr<AudioSource> audio_source) override;
48 ClientStub* client_stub() override; 49 ClientStub* client_stub() override;
50 ProcessStatsStub* stats_stub() override;
49 void set_clipboard_stub(ClipboardStub* clipboard_stub) override; 51 void set_clipboard_stub(ClipboardStub* clipboard_stub) override;
50 void set_host_stub(HostStub* host_stub) override; 52 void set_host_stub(HostStub* host_stub) override;
51 void set_input_stub(InputStub* input_stub) override; 53 void set_input_stub(InputStub* input_stub) override;
52 54
53 // Session::EventHandler interface. 55 // Session::EventHandler interface.
54 void OnSessionStateChange(Session::State state) override; 56 void OnSessionStateChange(Session::State state) override;
55 57
56 // WebrtcTransport::EventHandler interface 58 // WebrtcTransport::EventHandler interface
57 void OnWebrtcTransportConnecting() override; 59 void OnWebrtcTransportConnecting() override;
58 void OnWebrtcTransportConnected() override; 60 void OnWebrtcTransportConnected() override;
(...skipping 18 matching lines...) Expand all
77 79
78 std::unique_ptr<WebrtcTransport> transport_; 80 std::unique_ptr<WebrtcTransport> transport_;
79 81
80 std::unique_ptr<Session> session_; 82 std::unique_ptr<Session> session_;
81 83
82 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner_; 84 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner_;
83 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner_; 85 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner_;
84 86
85 std::unique_ptr<HostControlDispatcher> control_dispatcher_; 87 std::unique_ptr<HostControlDispatcher> control_dispatcher_;
86 std::unique_ptr<HostEventDispatcher> event_dispatcher_; 88 std::unique_ptr<HostEventDispatcher> event_dispatcher_;
89 std::unique_ptr<ProcessStatsDispatcher> stats_dispatcher_;
87 base::WeakPtrFactory<WebrtcConnectionToClient> weak_factory_; 90 base::WeakPtrFactory<WebrtcConnectionToClient> weak_factory_;
88 91
89 DISALLOW_COPY_AND_ASSIGN(WebrtcConnectionToClient); 92 DISALLOW_COPY_AND_ASSIGN(WebrtcConnectionToClient);
90 }; 93 };
91 94
92 } // namespace protocol 95 } // namespace protocol
93 } // namespace remoting 96 } // namespace remoting
94 97
95 #endif // REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_CLIENT_H_ 98 #endif // REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_CLIENT_H_
OLDNEW
« no previous file with comments | « remoting/protocol/process_stats_stub.h ('k') | remoting/protocol/webrtc_connection_to_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698