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

Unified Diff: remoting/client/chromoting_client.h

Issue 2861047: Refactor the client code. Move all x11-related code into X11View and create... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/client/chromoting_client.cc » ('j') | remoting/client/chromoting_client.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/chromoting_client.h
===================================================================
--- remoting/client/chromoting_client.h (revision 52921)
+++ remoting/client/chromoting_client.h (working copy)
@@ -15,14 +15,25 @@
namespace remoting {
class ChromotingView;
+class ClientConfig;
+class ClientContext;
+class InputHandler;
class ChromotingClient : public HostConnection::HostEventCallback {
public:
- ChromotingClient(MessageLoop* message_loop,
+ // Objects passed in are not owned by this class.
+ ChromotingClient(ClientConfig* config,
+ ClientContext* context,
HostConnection* connection,
- ChromotingView* view);
+ ChromotingView* view,
+ InputHandler* input_handler,
+ CancelableTask* client_done);
virtual ~ChromotingClient();
+ void Start();
+ void Stop();
+ void ClientDone();
+
// Signals that the associated view may need updating.
virtual void Repaint();
@@ -53,25 +64,24 @@
// Convenience method for modifying the state on this object's message loop.
void SetState(State s);
- // TODO(ajwong): Do all of these methods need to run on the client's thread?
- void DoSetState(State s);
- void DoRepaint();
- void DoSetViewport(int x, int y, int width, int height);
-
// Handles for chromotocol messages.
- void DoInitClient(HostMessage* msg);
- void DoBeginUpdate(HostMessage* msg);
- void DoHandleUpdate(HostMessage* msg);
- void DoEndUpdate(HostMessage* msg);
+ void InitClient(HostMessage* msg);
+ void BeginUpdate(HostMessage* msg);
+ void HandleUpdate(HostMessage* msg);
+ void EndUpdate(HostMessage* msg);
- MessageLoop* message_loop_;
+ // The following are not owned by this class.
+ ClientConfig* config_;
+ ClientContext* context_;
+ HostConnection* connection_;
+ ChromotingView* view_;
+ InputHandler* input_handler_;
+ // If non-NULL, this is called when the client is done.
+ CancelableTask* client_done_;
+
State state_;
- // Connection to views and hosts. Not owned.
- HostConnection* host_connection_;
- ChromotingView* view_;
-
DISALLOW_COPY_AND_ASSIGN(ChromotingClient);
};
« no previous file with comments | « no previous file | remoting/client/chromoting_client.cc » ('j') | remoting/client/chromoting_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698