Scroll in Android HTML Element accessibility navigation
[chromium-blink-merge.git] / remoting / protocol / quic_channel_factory.h
blobfd12f4c54ab10f60fac1238c43d0f68ac7cc33a7
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
3 // found in the LICENSE file.
5 #ifndef REMOTING_PROTOCOL_QUIC_CHANNEL_FACTORY_H_
6 #define REMOTING_PROTOCOL_QUIC_CHANNEL_FACTORY_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "remoting/protocol/stream_channel_factory.h"
11 namespace net {
12 class QuicP2PSession;
13 } // namespace net
15 namespace remoting {
16 namespace protocol {
18 class DatagramChannelFactory;
20 // QuicChannelFactory is responsible for QUIC connection between client and
21 // host.
22 class QuicChannelFactory : public StreamChannelFactory {
23 public:
24 QuicChannelFactory(const std::string& session_id, bool is_server);
25 ~QuicChannelFactory() override;
27 // QuicConfig handshake handlers for the client side.
28 const std::string& CreateSessionInitiateConfigMessage();
29 bool ProcessSessionAcceptConfigMessage(const std::string& message);
31 // QuicConfig handshake handlers for the server side.
32 bool ProcessSessionInitiateConfigMessage(const std::string& message);
33 const std::string& CreateSessionAcceptConfigMessage();
35 // Creates a QUIC connection using a datagram channel created using |factory|.
36 // Must be called after successful handshake using the methods above.
37 // |shared_secret| must contain the shared key generated by the authentication
38 // handshake.
39 void Start(DatagramChannelFactory* factory, const std::string& shared_secret);
41 // StreamChannelFactory interface.
42 void CreateChannel(const std::string& name,
43 const ChannelCreatedCallback& callback) override;
44 void CancelChannelCreation(const std::string& name) override;
46 net::QuicP2PSession* GetP2PSessionForTests();
48 private:
49 class Core;
50 scoped_ptr<Core> core_;
52 DISALLOW_COPY_AND_ASSIGN(QuicChannelFactory);
55 } // namespace protocol
56 } // namespace remoting
58 #endif // REMOTING_PROTOCOL_QUIC_CHANNEL_FACTORY_H_