MD Downloads: prevent search text from overlapping with the cancel search (X)
[chromium-blink-merge.git] / remoting / host / gnubby_auth_handler.h
blob70d8baec23f21bafc8215eabf7c47e8427957004
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef REMOTING_HOST_GNUBBY_AUTH_HANDLER_H_
6 #define REMOTING_HOST_GNUBBY_AUTH_HANDLER_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
13 namespace base {
14 class FilePath;
15 } // namespace base
17 namespace remoting {
19 namespace protocol {
20 class ClientStub;
21 } // namespace protocol
23 // Class responsible for proxying authentication data between a local gnubbyd
24 // and the client.
25 class GnubbyAuthHandler {
26 public:
27 virtual ~GnubbyAuthHandler() {}
29 // Creates a platform-specific GnubbyAuthHandler.
30 static scoped_ptr<GnubbyAuthHandler> Create(
31 protocol::ClientStub* client_stub);
33 // Specify the name of the socket to listen to gnubby requests on.
34 static void SetGnubbySocketName(const base::FilePath& gnubby_socket_name);
36 // A message was received from the client.
37 virtual void DeliverClientMessage(const std::string& message) = 0;
39 // Send data to client.
40 virtual void DeliverHostDataMessage(int connection_id,
41 const std::string& data) const = 0;
44 } // namespace remoting
46 #endif // REMOTING_HOST_GNUBBY_AUTH_HANDLER_H_