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

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

Issue 1545743002: Move ownership of Transport out of Session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass_client
Patch Set: Created 4 years, 12 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/host/remoting_me2me_host.cc ('k') | remoting/protocol/connection_unittest.cc » ('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_HOST_H_ 5 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_
6 #define REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ 6 #define REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
11 #include "remoting/protocol/errors.h" 12 #include "remoting/protocol/errors.h"
12 13
13 namespace remoting { 14 namespace remoting {
14 namespace protocol { 15 namespace protocol {
15 16
16 class AudioStub; 17 class AudioStub;
17 class Authenticator; 18 class Authenticator;
18 class ClientStub; 19 class ClientStub;
19 class ClipboardStub; 20 class ClipboardStub;
20 class HostStub; 21 class HostStub;
21 class InputStub; 22 class InputStub;
22 class Session; 23 class Session;
23 class SessionConfig; 24 class SessionConfig;
25 class TransportContext;
24 struct TransportRoute; 26 struct TransportRoute;
25 class VideoStub; 27 class VideoStub;
26 28
27 class ConnectionToHost { 29 class ConnectionToHost {
28 public: 30 public:
29 // The UI implementations maintain corresponding definitions of this 31 // The UI implementations maintain corresponding definitions of this
30 // enumeration in client_session.js and 32 // enumeration in client_session.js and
31 // android/java/src/org/chromium/chromoting/jni/JniInterface.java. Be sure to 33 // android/java/src/org/chromium/chromoting/jni/JniInterface.java. Be sure to
32 // update these locations if you make any changes to the ordering. 34 // update these locations if you make any changes to the ordering.
33 enum State { 35 enum State {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 virtual void set_client_stub(ClientStub* client_stub) = 0; 71 virtual void set_client_stub(ClientStub* client_stub) = 0;
70 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub) = 0; 72 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub) = 0;
71 virtual void set_video_stub(VideoStub* video_stub) = 0; 73 virtual void set_video_stub(VideoStub* video_stub) = 0;
72 // If no audio stub is specified then audio will not be requested. 74 // If no audio stub is specified then audio will not be requested.
73 virtual void set_audio_stub(AudioStub* audio_stub) = 0; 75 virtual void set_audio_stub(AudioStub* audio_stub) = 0;
74 76
75 // Initiates a connection using |session|. |event_callback| will be notified 77 // Initiates a connection using |session|. |event_callback| will be notified
76 // of changes in the state of the connection and must outlive the 78 // of changes in the state of the connection and must outlive the
77 // ConnectionToHost. Caller must set stubs (see below) before calling Connect. 79 // ConnectionToHost. Caller must set stubs (see below) before calling Connect.
78 virtual void Connect(scoped_ptr<Session> session, 80 virtual void Connect(scoped_ptr<Session> session,
81 scoped_refptr<TransportContext> transport_context,
79 HostEventCallback* event_callback) = 0; 82 HostEventCallback* event_callback) = 0;
80 83
81 // Returns the session configuration that was negotiated with the host. 84 // Returns the session configuration that was negotiated with the host.
82 virtual const SessionConfig& config() = 0; 85 virtual const SessionConfig& config() = 0;
83 86
84 // Stubs for sending data to the host. 87 // Stubs for sending data to the host.
85 virtual ClipboardStub* clipboard_forwarder() = 0; 88 virtual ClipboardStub* clipboard_forwarder() = 0;
86 virtual HostStub* host_stub() = 0; 89 virtual HostStub* host_stub() = 0;
87 virtual InputStub* input_stub() = 0; 90 virtual InputStub* input_stub() = 0;
88 91
89 // Return the current state of ConnectionToHost. 92 // Return the current state of ConnectionToHost.
90 virtual State state() const = 0; 93 virtual State state() const = 0;
91 }; 94 };
92 95
93 } // namespace protocol 96 } // namespace protocol
94 } // namespace remoting 97 } // namespace remoting
95 98
96 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ 99 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_
OLDNEW
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | remoting/protocol/connection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698