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

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

Issue 9921034: [Chromoting] Add plumbing to carry clipboard events from the host to the client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync. Created 8 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
« no previous file with comments | « no previous file | remoting/client/chromoting_client.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 // 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 <list>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/time.h" 13 #include "base/time.h"
14 #include "remoting/base/scoped_thread_proxy.h" 14 #include "remoting/base/scoped_thread_proxy.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/client/chromoting_view.h" 17 #include "remoting/client/chromoting_view.h"
18 #include "remoting/protocol/client_stub.h" 18 #include "remoting/protocol/client_stub.h"
19 #include "remoting/protocol/clipboard_stub.h"
19 #include "remoting/protocol/connection_to_host.h" 20 #include "remoting/protocol/connection_to_host.h"
20 #include "remoting/protocol/input_stub.h" 21 #include "remoting/protocol/input_stub.h"
21 #include "remoting/protocol/video_stub.h" 22 #include "remoting/protocol/video_stub.h"
22 #include "remoting/jingle_glue/xmpp_proxy.h" 23 #include "remoting/jingle_glue/xmpp_proxy.h"
23 24
24 class MessageLoop; 25 class MessageLoop;
25 26
26 namespace remoting { 27 namespace remoting {
27 28
28 class ClientContext; 29 class ClientContext;
29 class RectangleUpdateDecoder; 30 class RectangleUpdateDecoder;
30 31
31 // TODO(sergeyu): Move VideoStub implementation to RectangleUpdateDecoder. 32 // TODO(sergeyu): Move VideoStub implementation to RectangleUpdateDecoder.
32 class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback, 33 class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback,
33 public protocol::ClientStub, 34 public protocol::ClientStub,
35 public protocol::ClipboardStub,
34 public protocol::VideoStub { 36 public protocol::VideoStub {
35 public: 37 public:
36 // Objects passed in are not owned by this class. 38 // Objects passed in are not owned by this class.
37 ChromotingClient(const ClientConfig& config, 39 ChromotingClient(const ClientConfig& config,
38 ClientContext* context, 40 ClientContext* context,
39 protocol::ConnectionToHost* connection, 41 protocol::ConnectionToHost* connection,
40 ChromotingView* view, 42 ChromotingView* view,
41 RectangleUpdateDecoder* rectangle_decoder, 43 RectangleUpdateDecoder* rectangle_decoder,
42 const base::Closure& client_done); 44 const base::Closure& client_done);
43 virtual ~ChromotingClient(); 45 virtual ~ChromotingClient();
44 46
45 void Start(scoped_refptr<XmppProxy> xmpp_proxy); 47 void Start(scoped_refptr<XmppProxy> xmpp_proxy);
46 void Stop(const base::Closure& shutdown_task); 48 void Stop(const base::Closure& shutdown_task);
47 void ClientDone(); 49 void ClientDone();
48 50
49 // Return the stats recorded by this client. 51 // Return the stats recorded by this client.
50 ChromotingStats* GetStats(); 52 ChromotingStats* GetStats();
51 53
54 // ClipboardStub implementation.
55 virtual void InjectClipboardEvent(const protocol::ClipboardEvent& event)
56 OVERRIDE;
57
52 // ConnectionToHost::HostEventCallback implementation. 58 // ConnectionToHost::HostEventCallback implementation.
53 virtual void OnConnectionState( 59 virtual void OnConnectionState(
54 protocol::ConnectionToHost::State state, 60 protocol::ConnectionToHost::State state,
55 protocol::ErrorCode error) OVERRIDE; 61 protocol::ErrorCode error) OVERRIDE;
56 62
57 // VideoStub implementation. 63 // VideoStub implementation.
58 virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> packet, 64 virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> packet,
59 const base::Closure& done) OVERRIDE; 65 const base::Closure& done) OVERRIDE;
60 virtual int GetPendingPackets() OVERRIDE; 66 virtual int GetPendingPackets() OVERRIDE;
61 67
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 int64 last_sequence_number_; 117 int64 last_sequence_number_;
112 118
113 ScopedThreadProxy thread_proxy_; 119 ScopedThreadProxy thread_proxy_;
114 120
115 DISALLOW_COPY_AND_ASSIGN(ChromotingClient); 121 DISALLOW_COPY_AND_ASSIGN(ChromotingClient);
116 }; 122 };
117 123
118 } // namespace remoting 124 } // namespace remoting
119 125
120 #endif // REMOTING_CLIENT_CHROMOTING_CLIENT_H_ 126 #endif // REMOTING_CLIENT_CHROMOTING_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/client/chromoting_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698