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

Side by Side Diff: remoting/client/chromoting_client.h

Issue 13932020: Set the initial resolution of an RDP session to the client screen resolution if it is available. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed remoting_unittests Created 7 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 | Annotate | Revision Log
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 // ChromotingClient is the controller for the Client implementation. 5 // ChromotingClient is the controller for the Client implementation.
6 6
7 #ifndef REMOTING_CLIENT_CHROMOTING_CLIENT_H_ 7 #ifndef REMOTING_CLIENT_CHROMOTING_CLIENT_H_
8 #define REMOTING_CLIENT_CHROMOTING_CLIENT_H_ 8 #define REMOTING_CLIENT_CHROMOTING_CLIENT_H_
9 9
10 #include <list> 10 #include <string>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "remoting/client/client_config.h" 15 #include "remoting/client/client_config.h"
16 #include "remoting/client/chromoting_stats.h" 16 #include "remoting/client/chromoting_stats.h"
17 #include "remoting/protocol/client_stub.h" 17 #include "remoting/protocol/client_stub.h"
18 #include "remoting/protocol/clipboard_stub.h" 18 #include "remoting/protocol/clipboard_stub.h"
19 #include "remoting/protocol/connection_to_host.h" 19 #include "remoting/protocol/connection_to_host.h"
20 #include "remoting/protocol/input_stub.h" 20 #include "remoting/protocol/input_stub.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // Start/stop the client. Must be called on the main thread. 54 // Start/stop the client. Must be called on the main thread.
55 void Start(scoped_refptr<XmppProxy> xmpp_proxy, 55 void Start(scoped_refptr<XmppProxy> xmpp_proxy,
56 scoped_ptr<protocol::TransportFactory> transport_factory); 56 scoped_ptr<protocol::TransportFactory> transport_factory);
57 void Stop(const base::Closure& shutdown_task); 57 void Stop(const base::Closure& shutdown_task);
58 58
59 FrameProducer* GetFrameProducer(); 59 FrameProducer* GetFrameProducer();
60 60
61 // Return the stats recorded by this client. 61 // Return the stats recorded by this client.
62 ChromotingStats* GetStats(); 62 ChromotingStats* GetStats();
63 63
64 // ClientStub implementation.
65 virtual void SetCapabilities(
66 const protocol::Capabilities& capabilities) OVERRIDE;
67
64 // ClipboardStub implementation for receiving clipboard data from host. 68 // ClipboardStub implementation for receiving clipboard data from host.
65 virtual void InjectClipboardEvent(const protocol::ClipboardEvent& event) 69 virtual void InjectClipboardEvent(
66 OVERRIDE; 70 const protocol::ClipboardEvent& event) OVERRIDE;
67 71
68 // CursorShapeStub implementation for receiving cursor shape updates. 72 // CursorShapeStub implementation for receiving cursor shape updates.
69 virtual void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape) 73 virtual void SetCursorShape(
70 OVERRIDE; 74 const protocol::CursorShapeInfo& cursor_shape) OVERRIDE;
71 75
72 // ConnectionToHost::HostEventCallback implementation. 76 // ConnectionToHost::HostEventCallback implementation.
73 virtual void OnConnectionState( 77 virtual void OnConnectionState(
74 protocol::ConnectionToHost::State state, 78 protocol::ConnectionToHost::State state,
75 protocol::ErrorCode error) OVERRIDE; 79 protocol::ErrorCode error) OVERRIDE;
76 virtual void OnConnectionReady(bool ready) OVERRIDE; 80 virtual void OnConnectionReady(bool ready) OVERRIDE;
77 81
78 private: 82 private:
79 // Initializes connection. 83 // Initializes connection.
80 void Initialize(); 84 void Initialize();
81 85
82 void OnDisconnected(const base::Closure& shutdown_task); 86 void OnDisconnected(const base::Closure& shutdown_task);
83 87
84 // The following are not owned by this class. 88 // The following are not owned by this class.
85 ClientConfig config_; 89 ClientConfig config_;
86 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 90 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
87 protocol::ConnectionToHost* connection_; 91 protocol::ConnectionToHost* connection_;
88 ClientUserInterface* user_interface_; 92 ClientUserInterface* user_interface_;
89 scoped_refptr<RectangleUpdateDecoder> rectangle_decoder_; 93 scoped_refptr<RectangleUpdateDecoder> rectangle_decoder_;
90 94
91 scoped_ptr<AudioDecodeScheduler> audio_decode_scheduler_; 95 scoped_ptr<AudioDecodeScheduler> audio_decode_scheduler_;
92 96
93 // If non-NULL, this is called when the client is done. 97 // If non-NULL, this is called when the client is done.
94 base::Closure client_done_; 98 base::Closure client_done_;
95 99
100 // The set of all capabilities supported by the host.
101 scoped_ptr<std::string> host_capabilities_;
Sergey Ulanov 2013/04/18 00:34:53 why not just std::string instead of scoped_ptr?
alexeypa (please no reviews) 2013/04/18 18:56:36 Done.
102
96 // Record the statistics of the connection. 103 // Record the statistics of the connection.
97 ChromotingStats stats_; 104 ChromotingStats stats_;
98 105
99 // WeakPtr used to avoid tasks accessing the client after it is deleted. 106 // WeakPtr used to avoid tasks accessing the client after it is deleted.
100 base::WeakPtrFactory<ChromotingClient> weak_factory_; 107 base::WeakPtrFactory<ChromotingClient> weak_factory_;
101 base::WeakPtr<ChromotingClient> weak_ptr_; 108 base::WeakPtr<ChromotingClient> weak_ptr_;
102 109
103 DISALLOW_COPY_AND_ASSIGN(ChromotingClient); 110 DISALLOW_COPY_AND_ASSIGN(ChromotingClient);
104 }; 111 };
105 112
106 } // namespace remoting 113 } // namespace remoting
107 114
108 #endif // REMOTING_CLIENT_CHROMOTING_CLIENT_H_ 115 #endif // REMOTING_CLIENT_CHROMOTING_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698