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

Side by Side Diff: remoting/protocol/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
« no previous file with comments | « remoting/protocol/BUILD.gn ('k') | remoting/protocol/fake_connection_to_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CONNECTION_TO_CLIENT_H_ 5 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_
6 #define REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ 6 #define REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "remoting/protocol/transport.h" 12 #include "remoting/protocol/transport.h"
13 13
14 namespace webrtc { 14 namespace webrtc {
15 class DesktopCapturer; 15 class DesktopCapturer;
16 } // namespace webrtc 16 } // namespace webrtc
17 17
18 namespace remoting { 18 namespace remoting {
19 19
20 namespace protocol { 20 namespace protocol {
21 21
22 class AudioStream; 22 class AudioStream;
23 class AudioSource; 23 class AudioSource;
24 class ClientStub; 24 class ClientStub;
25 class ClipboardStub; 25 class ClipboardStub;
26 class HostStub; 26 class HostStub;
27 class InputStub; 27 class InputStub;
28 class ProcessStatsStub;
28 class Session; 29 class Session;
29 class VideoStream; 30 class VideoStream;
30 31
31 // This interface represents a remote viewer connection to the chromoting host. 32 // This interface represents a remote viewer connection to the chromoting host.
32 // It sets up all protocol channels and connects them to the stubs. 33 // It sets up all protocol channels and connects them to the stubs.
33 class ConnectionToClient { 34 class ConnectionToClient {
34 public: 35 public:
35 class EventHandler { 36 class EventHandler {
36 public: 37 public:
37 // Called when the network connection is authenticating 38 // Called when the network connection is authenticating
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // Starts an audio stream. Returns nullptr if audio is not supported by the 83 // Starts an audio stream. Returns nullptr if audio is not supported by the
83 // client. 84 // client.
84 virtual std::unique_ptr<AudioStream> StartAudioStream( 85 virtual std::unique_ptr<AudioStream> StartAudioStream(
85 std::unique_ptr<AudioSource> audio_source) = 0; 86 std::unique_ptr<AudioSource> audio_source) = 0;
86 87
87 // The client stubs used by the host to send control messages to the client. 88 // The client stubs used by the host to send control messages to the client.
88 // The stub must not be accessed before OnConnectionAuthenticated(), or 89 // The stub must not be accessed before OnConnectionAuthenticated(), or
89 // after OnConnectionClosed(). 90 // after OnConnectionClosed().
90 virtual ClientStub* client_stub() = 0; 91 virtual ClientStub* client_stub() = 0;
91 92
93 // The process stats stub used by the host to send process usage data to the
94 // client. The stub may be nullptr.
95 virtual ProcessStatsStub* stats_stub() = 0;
96
92 // Set the stubs which will handle messages we receive from the client. These 97 // Set the stubs which will handle messages we receive from the client. These
93 // must be called in EventHandler::OnConnectionAuthenticated(). 98 // must be called in EventHandler::OnConnectionAuthenticated().
94 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub) = 0; 99 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub) = 0;
95 virtual void set_host_stub(HostStub* host_stub) = 0; 100 virtual void set_host_stub(HostStub* host_stub) = 0;
96 virtual void set_input_stub(InputStub* input_stub) = 0; 101 virtual void set_input_stub(InputStub* input_stub) = 0;
97 }; 102 };
98 103
99 } // namespace protocol 104 } // namespace protocol
100 } // namespace remoting 105 } // namespace remoting
101 106
102 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ 107 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_
OLDNEW
« no previous file with comments | « remoting/protocol/BUILD.gn ('k') | remoting/protocol/fake_connection_to_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698