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

Side by Side Diff: remoting/test/test_chromoting_client.h

Issue 1237093004: Support for connecting to localhost on the chromoting test driver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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_TEST_TEST_CHROMOTING_CLIENT_H_ 5 #ifndef REMOTING_TEST_TEST_CHROMOTING_CLIENT_H_
6 #define REMOTING_TEST_TEST_CHROMOTING_CLIENT_H_ 6 #define REMOTING_TEST_TEST_CHROMOTING_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/observer_list.h" 12 #include "base/observer_list.h"
13 #include "remoting/client/chromoting_client.h" 13 #include "remoting/client/chromoting_client.h"
14 #include "remoting/client/client_user_interface.h" 14 #include "remoting/client/client_user_interface.h"
15 #include "remoting/protocol/clipboard_filter.h" 15 #include "remoting/protocol/clipboard_filter.h"
16 #include "remoting/protocol/cursor_shape_stub.h" 16 #include "remoting/protocol/cursor_shape_stub.h"
17 #include "remoting/test/host_info.h"
17 #include "remoting/test/remote_connection_observer.h" 18 #include "remoting/test/remote_connection_observer.h"
18 #include "remoting/test/remote_host_info.h" 19 #include "remoting/test/remote_host_info.h"
19 20
20 namespace remoting { 21 namespace remoting {
21 22
22 class ClientContext; 23 class ClientContext;
23 class XmppSignalStrategy; 24 class XmppSignalStrategy;
24 class VideoRenderer; 25 class VideoRenderer;
25 26
26 namespace protocol { 27 namespace protocol {
(...skipping 11 matching lines...) Expand all
38 // callback. 39 // callback.
39 // A VideoRenderer can be passed in to customize the connection. 40 // A VideoRenderer can be passed in to customize the connection.
40 class TestChromotingClient : public ClientUserInterface, 41 class TestChromotingClient : public ClientUserInterface,
41 public protocol::ClipboardStub, 42 public protocol::ClipboardStub,
42 public protocol::CursorShapeStub { 43 public protocol::CursorShapeStub {
43 public: 44 public:
44 TestChromotingClient(); 45 TestChromotingClient();
45 explicit TestChromotingClient(scoped_ptr<VideoRenderer> video_renderer); 46 explicit TestChromotingClient(scoped_ptr<VideoRenderer> video_renderer);
46 ~TestChromotingClient() override; 47 ~TestChromotingClient() override;
47 48
48 // Starts a chromoting connection with the specified remote host. 49 // Starts a chromoting connection with the specified remote host. Depending on
50 // the application, connections may require third party authentications
51 // or a PIN to complete the process.
joedow 2015/07/14 19:58:44 Can you remove the comments you added, I don't thi
tonychun 2015/07/15 17:32:50 Done.
52 void StartConnection(const std::string& user_name,
53 const std::string& access_token,
54 const std::string& client_pin,
55 const HostInfo& host_info);
joedow 2015/07/14 19:58:44 Please add unit tests for any new functionality ad
tonychun 2015/07/15 17:32:50 Done.
49 void StartConnection(const std::string& user_name, 56 void StartConnection(const std::string& user_name,
50 const std::string& access_token, 57 const std::string& access_token,
51 const RemoteHostInfo& remote_host_info); 58 const RemoteHostInfo& remote_host_info);
52 59
53 // Ends the current remote connection and updates the connection state. 60 // Ends the current remote connection and updates the connection state.
54 void EndConnection(); 61 void EndConnection();
55 62
56 // Stubs used to send messages to the remote host. 63 // Stubs used to send messages to the remote host.
57 protocol::ClipboardStub* clipboard_forwarder() { 64 protocol::ClipboardStub* clipboard_forwarder() {
58 return chromoting_client_->clipboard_forwarder(); 65 return chromoting_client_->clipboard_forwarder();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // Used to establish an XMPP connection with the google talk service. 125 // Used to establish an XMPP connection with the google talk service.
119 scoped_ptr<XmppSignalStrategy> signal_strategy_; 126 scoped_ptr<XmppSignalStrategy> signal_strategy_;
120 127
121 DISALLOW_COPY_AND_ASSIGN(TestChromotingClient); 128 DISALLOW_COPY_AND_ASSIGN(TestChromotingClient);
122 }; 129 };
123 130
124 } // namespace test 131 } // namespace test
125 } // namespace remoting 132 } // namespace remoting
126 133
127 #endif // REMOTING_TEST_TEST_CHROMOTING_CLIENT_H_ 134 #endif // REMOTING_TEST_TEST_CHROMOTING_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698